appcompat-v7:28.0.0-rc02 doesn't work with design:28.0.0-rc01(should be rc02, but we can't)
Asked Answered
E

8

16

com.android.support:appcompat-v7:28.0.0-rc02

com.android.support:design:28.0.0-rc01 -> should be rc02, but there's no rc02 actually.

error:

app/build.gradle:74: Error: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes).
Found versions 28.0.0-rc02, 28.0.0-rc01. Examples include com.android.support:animated-vector-drawable:28.0.0-rc02 and com.android.support:cardview-v7:28.0.0-rc01 [GradleCompatible]

I know it's a warning, we have turned to warn as the errors in CI in order to avoid the potential dead crashes, well, any solution except turn off option for CI?

issue

Estrange answered 29/8, 2018 at 13:55 Comment(0)
E
-2

I close this ticket, the problem has been solved that Google has updated design library to 28.0.0-rc02 .

Estrange answered 9/9, 2018 at 19:44 Comment(0)
C
8

UPDATE

Design library version 28.0.0-cr02 published.

OLD ANSWER

According to this link

https://mvnrepository.com/artifact/com.android.support/design?repo=google

design:28.0.0-rc02 not yet published.

So all you can do for now is use the previous version for appcompat and wait until design library new version28.0.0-cr02 release.

So for now use this :

implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
Ctenidium answered 3/9, 2018 at 8:36 Comment(2)
Android Studio 3.1.4, fresh installed not working for me. The layout is emptyCampus
@Campus Try to change your them in style. i use NoActionBar and preview work , this is another bugCtenidium
K
3

I don't know why... But they(sdk devs) behaving like Microsoft..

"Ohh..It compiles, lets ship it".

They just launch and don't care about bugs.. after updating to latest libs every time, first thing i get is..

"Layout editor preview errors.".

i hope it will be easy next time. :/

Koerner answered 7/9, 2018 at 14:4 Comment(0)
E
2

Keep track of the library here, until its published, use rc01 for other ones.

https://mvnrepository.com/artifact/com.android.support/design?repo=google

Excide answered 4/9, 2018 at 16:48 Comment(0)
M
2

That's why I use stable versions always

If you are developing an app, you don't want to face these type of errors.

At the time of answering the current most stable version is 27.1.1 and second 28.0.0-rc02.

I suggest use 27.1.1 until 28 stable version release.

implementation 'com.android.support:appcompat-v7:27.1.1'
  • Sync again
  • No need of Invalidate/ Restart, Just restart would be okay. Or closing project and reopening from recent would be faster then restart.

Track the support library release.

Molokai answered 18/9, 2018 at 12:25 Comment(0)
T
-1

Replace your

implementation 'com.android.support:appcompat-v7:28.0.0-rc02'

with

 implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
Tamishatamma answered 3/9, 2018 at 6:14 Comment(1)
Welcome to SO, Bharat. To counter your answer, alpha1 is much older than rc02. By its name you can probably guess that alpha1 is the earliest in the 28.0.0 releases, and rc (release candidate) versions are newer (and also more stable). Unless you know of a good reason why, i'd say using an RC is better than alpha builds as they tend to be (relatively) more stable.Diversification
D
-1

Looks like this should no longer be an issue. Looking at the link below, i think that whatever hiccups were encountered by OP are no longer relevant.

https://mvnrepository.com/artifact/com.android.support/appcompat-v7/28.0.0-rc02

About the error message "All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes)." The solution is outlined here (the answer by João Paulo Paiva).

To rid yourself of the error message, you have to basically include each package name mentioned in the warning - com.android.support:animated-vector-drawable:28.0.0-rc02 and com.android.support:cardview-v7:28.0.0-rc01

Essentially, manually add the following lines to your build.gradle

implementation com.android.support:animated-vector-drawable:28.0.0-rc02 
implementation com.android.support:cardview-v7:28.0.0-rc02

You may encounter more such warnings - the solution is to keep subsequently adding the libraries/dependencies mentioned (and updating the version to 28.0.0-rc02 as well) until the warnings go away. I had this issue, and after the first lot, I didn't get any more, but YMMV!

Diversification answered 5/9, 2018 at 17:0 Comment(1)
Can you explain what you did before, and what errors or warnings you got?Diversification
E
-2

1.Go to project/.idea/libraries folder on your file system and see which libraries are different.

2.You will have to manually include these libraries with the same version in your build.gradle file.

3.Then, sync your project

In Your Case:-

Add This Dependency :-

implements 'com.android.support:cardview-v7:28.0.0-rc02'

Add all dependency with Latest version which shows in error message.

Entebbe answered 3/9, 2018 at 8:3 Comment(0)
E
-2

I close this ticket, the problem has been solved that Google has updated design library to 28.0.0-rc02 .

Estrange answered 9/9, 2018 at 19:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.