Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android support library error after updating to 23.3.0

I have been using android support v4 23.1.1 and recently tried to update it to 23.3.0 ( the latest one when this was asked) but I got the following error:

Error:Conflict with dependency 'com.android.support:support-annotations'.
Resolved versions for app (23.3.0) and test app (23.1.1) differ.
See http://g.co/androidstudio/app-test-app-conflict for details.

So far I have found this https://code.google.com/p/android/issues/detail?id=206137

I went to both the links but I could not fix my issue, how do I fix this issue?

Edit:

I have these in my dependencies

compile 'com.android.support:support-v4:23.3.0' compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:recyclerview-v7:23.3.0' compile 'com.android.support:cardview-v7:23.3.0' compile 'com.android.support:design:23.3.0' 

Previously all the versions were 23.1.1 and it worked fine the error occurred after updating

Edit:

Gradle Version 2.10 Gradle Plugin Version 2.0.0 buildToolsVersion "23.0.3" 
like image 362
Nongthonbam Tonthoi Avatar asked Apr 25 '16 06:04

Nongthonbam Tonthoi


1 Answers

For those people who are still facing this problem just add this line to your dependencies.

androidTestCompile 'com.android.support:support-annotations:23.3.0' 

It solved my problem.

UPDATE:

If you have this error nowadays, you can just insert the new versioncode (23.3.0 in this case, or 27.1.1 in May '18) as it is described in the error into the above described solution.

like image 75
Nongthonbam Tonthoi Avatar answered Oct 17 '22 11:10

Nongthonbam Tonthoi