由于混合版本,我收到错误
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'
com.android.support:exifinterface:27.1.0
在 Picasso 下,
也许是 Picasso,因为我添加了 28 版,但 Picasso 仍在使用 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 吗?还是使用 Glide?p>
谢谢,
最佳答案
试一试:
implementation ('com.squareup.picasso:picasso:2.71828') {
exclude group: 'com.android.support'
exclude module: ['exifinterface', 'support-annotations']
}
关于Android Picasso 给出混合版本错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52805344/