最近项目中用到Google的guava依赖包进行开发:
implementation 'com.google.guava:guava:24.1-jre'
在正常开发完成了,打包测试也没出现什么问题,结果要上线的时候,打release包却爆出一下错误:
Cannot find a version of 'com.google.code.findbugs:jsr305' that satisfies the version constraints:
Dependency path 'XX:app:unspecified' --> 'androidx.test.espresso:espresso-core:3.1.2-alpha01' --> 'com.google.code.findbugs:jsr305:2.0.1'
Constraint path 'XX:app:unspecified' --> 'com.google.code.findbugs:jsr305' strictly '1.3.9' because of the following reason: debugRuntimeClasspath uses version 1.3.9
百度解决方案无果,看到了stackoverflow的一个解决方案:飞机直达
说在gradle增加
androidTestI

在准备上线时,遇到Android release包打包失败,错误提示无法找到'com.google.code.findbugs:jsr305'的版本。尝试了StackOverflow上的常见解决方案无效,经过一番探索,在gradle的android标签下添加特定配置解决了问题,避免了编译错误。
最低0.47元/天 解锁文章

443

被折叠的 条评论
为什么被折叠?



