找不到满足版本限制的'com.google.code.findbugs:jsr305'版本 [英] Cannot find a version of 'com.google.code.findbugs:jsr305' that satisfies the version constraints
问题描述
生成签名的APK时,我得到以下错误消息:
When generated signed APK for realse i get this error message:
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
这是我的app:gradle
This is my app:gradle
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.XX.XX"
minSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.guava:guava:22.0-android'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
}
但是,如果我为调试而构建,则可以正常工作,但是当我生成签名版本时,我收到此消息,香港专业教育学院试图谷歌搜索,但似乎没有找到正确的答案.
However if i build for debug it works fine, but when i generate signed release I get this message, ive tried to google but didnt seem to find the right answer.
推荐答案
我今天遇到了类似的问题,发现了这一点: https://github.com/trello/RxLifecycle/issues/154
I had a similar problem today and found this : https://github.com/trello/RxLifecycle/issues/154
通过在依赖项下编辑(module:app)中的Gradle脚本build.gradle来解决我的问题,
Manged to fix my problem by editing the Gradle Scripts build.gradle in the (module:app) under dependancies adding :
androidTestImplementation 'com.google.code.findbugs:jsr305:1.3.9'
我最初尝试使用其他版本号,但遇到一个错误,告诉我要使用哪个版本,因此您可能需要尝试几次.
I originally tried a different version number but got an error that told me what version to use, so you may need to have a couple of tries.
这篇关于找不到满足版本限制的'com.google.code.findbugs:jsr305'版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!