React Native集成错误Warning:Conflict with dependency 'com.google.code.findbugs:jsr305'.

前端之家收集整理的这篇文章主要介绍了React Native集成错误Warning:Conflict with dependency 'com.google.code.findbugs:jsr305'.前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

第一次加班通宵,不写的什么东西是不是对不起自己,最近在搞ReactNative,在项目引入相关maven库会报错

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


经过倒腾找到一种解决方案,在项目app根目录中的build.gradle的Android{}里添加

 configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
    }

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
   ...
    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
    }
   ...
    }
}

然后将项目重新Rebuild就可以解决 原文链接:https://www.f2er.com/react/303119.html

猜你在找的React相关文章