第一次加班通宵,不写的什么东西是不是对不起自己,最近在搞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就可以解决