![](/img/trans.png)
[英]Could not resolve all files for configuration ':app:debugRuntimeClasspath' android studio
[英]Could not resolve all files for configuration ':app:debugRuntimeClasspath
我收到一些錯誤
任務 ':app:desugarDebugFileDependencies' 執行失敗。 無法解析配置“:app:debugRuntimeClasspath”的所有文件。 找不到 com.google.guava:listenablefuture:1.0。
並顯示類似的東西 要求:項目:app > androidx.appcompat:appcompat:1.4.0 > androidx.core:core:1.7.0 > androidx.concurrent:concurrent-futures:1.0.0
我該如何解決這個問題。 請有人幫助我
這是我的Build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 31
defaultConfig {
applicationId "com.example.bloodbuddy"
minSdkVersion 21
targetSdkVersion 31
versionCode 6
versionName "2.0.1"
testInstrumentationRunner "androidx.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
implementation("androidx.constraintlayout:constraintlayout:2.1.2")
implementation 'com.google.firebase:firebase-database:20.0.3'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
implementation 'com.google.firebase:firebase-storage:20.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
你找到答案了嗎? 因為您沒有顯示您的項目根目錄build.gradle
並且可能項目根目錄中的 build.gradle 沒有mavenCentral()
存儲庫。
只需將 go 到您的 build.gradle 存儲庫並添加mavenCentral()
。
項目根目錄build.gradle
buildscript {
repositories {
google()
mavenCentral() // <= add this
}
dependencies {
// make sure to have this classpath
classpath 'com.google.gms:google-services:4.3.10'
}
}
........
allprojects {
repositories {
google()
mavenCentral() // <= add this
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.