Reputation: 20130
I updated SDK yesterday and after project sync I got next message:
Error:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.2.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
I suppose Android Studio tries to use latest dependencies even I didn't change my Gradle files. How to workaround it?
Upvotes: 0
Views: 628
Reputation: 20130
The cause is the dependency that we use. This library defines transitive dependency like:
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>23+</version>
<scope>compile</scope>
</dependency>
So the solution was to exclude support library from it:
compile(<my dependency>, ext: 'aar') {
exclude group: 'com.android.support'
transitive = true
}
The owner of the library already notified about it.
Thank you for help!
Upvotes: 0
Reputation: 850
Add the below line in to your build.gradle script.
androidTestCompile 'com.android.support:support-annotations:23.2.0'
Upvotes: 1