Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Picasso gives mixing versions error

I`m getting an error due to mixing versions

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-rc01, 27.1.0. Examples include 'com.android.support:animated-vector-drawable:28.0.0-rc01' and 'com.android.support:exifinterface:27.1.0'

The com.android.support:exifinterface:27.1.0 is coming under Picasso, maybe with Picasso, since I added version 28, yet Picasso still using version 27, and Volley is using version 28:

+--- com.android.volley:volley:1.1.+ -> 1.1.1
+--- com.android.support:exifinterface:28.0.0
|    \--- com.android.support:support-annotations:28.0.0
+--- com.android.support:support-annotations:28.0.0
\--- com.squareup.picasso:picasso:2.71828
 +--- com.squareup.okhttp3:okhttp:3.10.0
 |    \--- com.squareup.okio:okio:1.14.0
 +--- com.android.support:support-annotations:27.1.0 -> 28.0.0
 \--- com.android.support:exifinterface:27.1.0 -> 28.0.0 (*)


dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:28.0.0-rc01'
implementation 'com.android.volley:volley:1.1.+'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
}

How to fix this issue, should I downgrade the SDK to 27? or use Glide?

Thanks,

like image 837
Marvix Avatar asked Oct 14 '18 17:10

Marvix


1 Answers

Try it:

implementation ('com.squareup.picasso:picasso:2.71828') {
        exclude group: 'com.android.support'
        exclude module: ['exifinterface', 'support-annotations']
}
like image 186
Makoto Hata Avatar answered Sep 20 '22 14:09

Makoto Hata