美文网首页
错误Conflict with dependency '

错误Conflict with dependency '

作者: 圈圈猫 | 来源:发表于2017-04-10 23:05 被阅读48次

    今天突然之间加了一个rxlifecycle包后出现了一个警告错误:

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

    解决方案:
    在app下的build.gradle中的Android目录下添加如下代码:

    android {
        compileSdkVersion 25
        buildToolsVersion "25.0.2"
        defaultConfig {
            applicationId "com.example.test"
            minSdkVersion 15
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        
        configurations.all {
            resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
        }
    }
    
    

    ok!就这样点击同步按钮就解决了。

    相关文章

      网友评论

          本文标题:错误Conflict with dependency '

          本文链接:https://www.haomeiwen.com/subject/gvweattx.html