android - 无法解析 com.google.guava :guava:30. 1-jre - Gradle 项目同步失败。基本功能将无法正常工作 - 在 kotlin 项目中

标签 android kotlin gradle guava

是一个以前运行良好的项目,但更新后出现如下错误。

plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.example.retrofit_test"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

//    implementation 'com.google.guava:guava:30.1.1-jre'
    implementation 'com.google.guava:guava:30.1-jre'

//    implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.5.30-M1'

    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'

    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.google.code.gson:gson:2.8.7'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'

    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation 'android.arch.persistence.room:guava:1.1.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
如果我们需要更多源代码来检查,我会更新它。
错误内容如下。
配置根项目“Retrofit_Test”时出现问题。
   Could not resolve all artifacts for configuration ':classpath'.
   Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.30/kotlin-gradle-plugin-1.5.30.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project :
   Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.32/kotlin-stdlib-jdk8-1.4.32.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:repository:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:aaptcompiler:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:shared:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.lint:lint-model:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder-model:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:gradle-api:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2 > com.android.tools:common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.analytics-library:tracker:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:manifest-merger:30.0.2
   Could not find org.apache.httpcomponents:httpmime:4.5.6.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdklib:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:crash:30.0.2
   Could not find commons-io:commons-io:2.4.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
   Could not find org.ow2.asm:asm:7.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/ow2/asm/asm/7.0/asm-7.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:gradle-api:7.0.2
   Could not find org.ow2.asm:asm-analysis:7.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
   Could not find org.ow2.asm:asm-commons:7.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
   Could not find org.ow2.asm:asm-util:7.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-util/7.0/asm-util-7.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
   Could not find org.bouncycastle:bcpkix-jdk15on:1.56.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:apkzlib:7.0.2
   Could not find org.glassfish.jaxb:jaxb-runtime:2.3.2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdklib:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:repository:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
   Could not find net.sf.jopt-simple:jopt-simple:4.9.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
   Could not find com.squareup:javapoet:1.10.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/squareup/javapoet/1.10.0/javapoet-1.10.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
   Could not find com.google.protobuf:protobuf-java:3.10.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.ddms:ddmlib:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:aapt2-proto:7.0.2-7396180
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:aaptcompiler:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-device-provider-gradle-proto:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:bundletool:1.6.0
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:shared:30.0.2 > com.android.tools.analytics-library:protos:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.analytics-library:tracker:30.0.2
   Could not find com.google.protobuf:protobuf-java-util:3.10.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/protobuf/protobuf-java-util/3.10.0/protobuf-java-util-3.10.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:bundletool:1.6.0
   Could not find com.google.code.gson:gson:2.8.6.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdklib:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:shared:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:manifest-merger:30.0.2
   Could not find io.grpc:grpc-core:1.21.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/io/grpc/grpc-core/1.21.1/grpc-core-1.21.1.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
   Could not find io.grpc:grpc-netty:1.21.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/io/grpc/grpc-netty/1.21.1/grpc-netty-1.21.1.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
   Could not find io.grpc:grpc-protobuf:1.21.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/io/grpc/grpc-protobuf/1.21.1/grpc-protobuf-1.21.1.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
   Could not find io.grpc:grpc-stub:1.21.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/io/grpc/grpc-stub/1.21.1/grpc-stub-1.21.1.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
   Could not find com.google.crypto.tink:tink:1.3.0-rc2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/crypto/tink/tink/1.3.0-rc2/tink-1.3.0-rc2.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
   Could not find com.google.flatbuffers:flatbuffers-java:1.12.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
   Could not find org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/tensorflow/tensorflow-lite-metadata/0.1.0-rc2/tensorflow-lite-metadata-0.1.0-rc2.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2
   Could not find org.bouncycastle:bcprov-jdk15on:1.56.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:apkzlib:7.0.2
   Could not find com.google.guava:guava:30.1-jre.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:aaptcompiler:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:crash:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:shared:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder-test-api:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:bundletool:1.6.0
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:gradle-api:7.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2 > com.android.tools:common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.analytics-library:tracker:30.0.2
   Could not find org.jetbrains.kotlin:kotlin-reflect:1.4.32.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-reflect/1.4.32/kotlin-reflect-1.4.32.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
   Could not find javax.inject:javax.inject:1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/javax/inject/javax.inject/1/javax.inject-1.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:bundletool:1.6.0
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
   Could not find net.sf.kxml:kxml2:2.3.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.ddms:ddmlib:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.lint:lint-model:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.layoutlib:layoutlib-api:30.0.2
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:manifest-merger:30.0.2
   Could not find org.jetbrains.intellij.deps:trove4j:1.0.20181211.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/jetbrains/intellij/deps/trove4j/1.0.20181211/trove4j-1.0.20181211.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
   Could not find xerces:xercesImpl:2.12.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/xerces/xercesImpl/2.12.0/xercesImpl-2.12.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
   Could not find org.apache.commons:commons-compress:1.20.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.

最佳答案

在构建脚本中添加 mavenCentral()

    repositories {
        mavenCentral()
        google()
    }

关于android - 无法解析 com.google.guava :guava:30. 1-jre - Gradle 项目同步失败。基本功能将无法正常工作 - 在 kotlin 项目中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69205327/

相关文章:

android - 如何渲染从 onPreExecute() 中的 AsyncTask 获取的 ArrayList<ImageView>?

iphone - iPhone 与 Android 上的 Web 应用程序性能

android - Android资源编译失败-AAPT错误-资源重复值

kotlin - Kotlin 中的 Python 列表、集合和映射推导等价物是什么?

gradle - 无法扩展 Gradle 任务

java - 将 Gradle 依赖项保存到目录

android - 相同高度的 View 对于顶 View 和底 View 看起来不同

android - 如何在 webview 和 chrome 中同步 cookie android

java - Jacoco参数化违规规则值

gradle - 由于版本太旧错误,无法将gradle wrapper任务添加到旧项目