Reputation: 21
I'm trying to make an app that uses google maps API.
But there seems to be an error in regards to libraries, that are incompatible.
It says
'Found versions 28.0.0 and 26.1.0 examples including com.android.support:animated_vector_drawable:28.0.0 and com.android.support:support-media-compact:26.1.0
Would this have an effect on calling R.id by any chance?
I've tried clean and rebuild, and invalid cache reset. I tried to add the files as version 28.0.0 in dependency and received 2 errors:
Failed to resolve: com.android.support:support-media-compact:28.0.0 Failed to resolve: com.android
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-media-compact:28.0.0'
implementation 'com.android.support:animated_vector_drawable:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
I would've thought that rewriting the versions would have fixed the problem but 'com.android.support:appcompat-v7:28.0.0' is still underlined in red.
Upvotes: 2
Views: 1689
Reputation: 4780
Using the Gradle View plugin http://plugins.jetbrains.com/plugin/7150-gradle-view, I determined the issue is that play-services-location:16.0.0 has a dependency on com.android.support:support-media-compat:26.1.0. One technique I found to remove the warning is described here: https://docs.gradle.org/current/userguide/managing_transitive_dependencies.html
which led me to add this to my gradle file:
implementation("com.android.support:appcompat-v7:28.0.0") {
force = true
}
Upvotes: 2
Reputation: 4442
Add all the dependencies (that is said to be conflicting with existing libraries) with same version no. of which it is conflicting with.
Upvotes: 0
Reputation: 1351
Here you can see the latest libraries update available : link to go . And if you face again an error, you have to post the Logcat.
Upvotes: 0