首页 > 解决方案 > Android Picasso 给出混合版本错误

问题描述

由于混合版本,我收到错误

所有 com.android.support 库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本 28.0.0-rc01、27.1.0。示例包括 'com.android.support:animated-vector-drawable:28.0.0-rc01' 和 'com.android.support:exifinterface:27.1.0'

由于com.android.support:exifinterface:27.1.0我添加了第 28 版,毕加索正在使用毕加索,可能与毕加索一起使用,但毕加索仍在使用第 27 版,而 Volley 正在使用第 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'
}

如何解决这个问题,我应该将 SDK 降级到 27 吗?还是使用滑翔?

谢谢,

标签: androidpicasso

解决方案


尝试一下:

implementation ('com.squareup.picasso:picasso:2.71828') {
        exclude group: 'com.android.support'
        exclude module: ['exifinterface', 'support-annotations']
}

推荐阅读