Error:Conflict with dependency 'com.google.code.findbugs:jsr305'

Android Studio 2.3.3


錯誤信息如下:

Error:Conflict with dependency 'com.google.code.findbugs:jsr305'. Resolved versions for app (3.0.2) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.

是espresso引起的。

在APP的gradle文件中,如下修改:

dependencies {
    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'
        exclude module: 'jsr305'
    })

增加一行排除:

exclude module: 'jsr305'

即可。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章