在Android Studio中,所有com.android.support库都必须使用完全相同的版本

问题描述 投票:0回答:1

我最近升级到Android Studio 2.3。并且此错误开始出现:

enter image description here

这是我的图书馆清单:

compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/wekaSTRIPPED.jar')
compile('com.mikepenz:materialdrawer:5.8.1@aar') { // Material Drawer
    transitive = true
}
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.google.dagger:dagger:2.9'
compile 'com.github.wendykierp:JTransforms:3.1'
compile 'com.afollestad.material-dialogs:commons:0.9.3.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.github.paolorotolo:appintro:4.1.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.borax12.materialdaterangepicker:library:1.9'
compile 'com.evernote:android-job:1.1.7' // Scheduling library
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.9'

关于解决此问题的任何想法?

android gradle
1个回答
1
投票

更新到Android Studio 2.3时,您遇到了类似您的问题。我通过使用25.1.1在我的项目中搜索所有支持库来解决(我搜索了[[25.1.1)并替换为25.2.0。我认为您的库和项目中有许多使用25.1.1的代码。

您可以在项目中打开外部库以显示所有依赖性。您应该更新到新的库版本(使用支持库的库):

例如:https://github.com/mikepenz/MaterialDrawer-使用25.2.0的新版本是5.8.2

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.