FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath'.
> Could not resolve androidx.concurrent:concurrent-futures:{strictly 1.0.0}.
Required by:
project :app
> Cannot find a version of 'androidx.concurrent:concurrent-futures' that satisfies the version constraints:
Dependency path 'DBRL ORDERS:app:unspecified' --> 'androidx.test.ext:junit:1.1.5' --> 'androidx.test:core:1.5.0' --> 'androidx.concurrent:concurrent-futures:1.1.0'
Constraint path 'DBRL ORDERS:app:unspecified' --> 'androidx.concurrent:concurrent-futures:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'DBRL ORDERS:app:unspecified' --> 'androidx.appcompat:appcompat:1.6.1' --> 'androidx.core:core:1.9.0' --> 'androidx.concurrent:concurrent-futures:1.0.0'
> Could not resolve androidx.concurrent:concurrent-futures:1.1.0.
Required by:
project :app > androidx.test.ext:junit:1.1.5 > androidx.test:core:1.5.0
> Cannot find a version of 'androidx.concurrent:concurrent-futures' that satisfies the version constraints:
Dependency path 'DBRL ORDERS:app:unspecified' --> 'androidx.test.ext:junit:1.1.5' --> 'androidx.test:core:1.5.0' --> 'androidx.concurrent:concurrent-futures:1.1.0'
Constraint path 'DBRL ORDERS:app:unspecified' --> 'androidx.concurrent:concurrent-futures:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'DBRL ORDERS:app:unspecified' --> 'androidx.appcompat:appcompat:1.6.1' --> 'androidx.core:core:1.9.0' --> 'androidx.concurrent:concurrent-futures:1.0.0'
> Could not resolve androidx.concurrent:concurrent-futures:1.0.0.
Required by:
project :app > androidx.core:core:1.9.0
> Cannot find a version of 'androidx.concurrent:concurrent-futures' that satisfies the version constraints:
Dependency path 'DBRL ORDERS:app:unspecified' --> 'androidx.test.ext:junit:1.1.5' --> 'androidx.test:core:1.5.0' --> 'androidx.concurrent:concurrent-futures:1.1.0'
Constraint path 'DBRL ORDERS:app:unspecified' --> 'androidx.concurrent:concurrent-futures:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'DBRL ORDERS:app:unspecified' --> 'androidx.appcompat:appcompat:1.6.1' --> 'androidx.core:core:1.9.0' --> 'androidx.concurrent:concurrent-futures:1.0.0'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
我在 android studio 中生成签名的 apk 时遇到此错误。
我尝试生成一个签名的 apk,这是输出。
这是我的 gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 31
buildToolsVersion "29.0.2"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.example.dbrlorders"
minSdkVersion 14
targetSdkVersion 31
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(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.volley:volley:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}