cordova -机器人11::无法找到com.google.xy

n3h0vuf2  于 2022-11-15  发布在  Go
关注(0)|答案(1)|浏览(143)

更新到cordova-android 11.0.0后,Android构建失败,并出现以下错误:
我已经尽了一切可能,但我还是不知道...

> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.google.android.gms:play-services-auth:20.3.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-auth/20.3.0/play-services-auth-20.3.0.pom
       - https://repo.maven.apache.org/maven2/com/google/android/gms/play-services-auth/20.3.0/play-services-auth-20.3.0.pom
     Required by:
         project :app
   > Could not find com.google.android.gms:play-services-identity:20.3.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-identity/20.3.0/play-services-identity-20.3.0.pom
       - https://repo.maven.apache.org/maven2/com/google/android/gms/play-services-identity/20.3.0/play-services-identity-20.3.0.pom
     Required by:
         project :app

build.gradle:

buildscript {
    apply from: 'CordovaLib/cordova.gradle'
    apply from: 'repositories.gradle'
    repositories repos
    dependencies {
        classpath "com.android.tools.build:gradle:${cordovaConfig.AGP_VERSION}"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${cordovaConfig.KOTLIN_VERSION}"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
    cdvHelpers.verifyCordovaConfigForBuild()
  }

repositories.gradle:

ext.repos = {
    google()
    mavenCentral()
}

cordova.gradle:

buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'io.github.g00fy2:versioncompare:1.4.1@jar'
    }
}

有人有什么想法吗?

w3nuxt5m

w3nuxt5m1#

这是一个旧的插件导致的错误。

相关问题