首页 > 解决方案 > 无法解析 com.com.google.maps.android:android-maps-utils-v3:2.2.1

问题描述

我想升级到新的地图sdk,因为谷歌过去拒绝修复错误我添加了一个依赖项

implementation 'com.google.maps.android:android-maps-utils-v3:2.2.1'

// V3
implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
implementation 'com.google.android.gms:play-services-basement:17.6.0'
implementation 'com.google.android.gms:play-services-base:17.6.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'

但是在构建项目时,他写信给我

Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Could not find com.google.maps.android:android-maps-utils-v3:2.2.1.
     Required by:
         project :app

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

我还附上了 Gradle 文件

项目

buildscript {
    ext.nav_version = '1.0.0'
    repositories {
        google()
        mavenCentral()
        maven { url "https://dl.bintray.com/drummer-aidan/maven/" }
        jcenter()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.0-alpha05'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10"
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
    }

}

allprojects {
    repositories {
        google()
        maven { url 'https://jitpack.io' }
        maven { url "https://dl.bintray.com/drummer-aidan/maven/" }
        jcenter()
        mavenCentral()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

模块

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

...
    

dependencies {

    implementation 'com.google.maps.android:android-maps-utils-v3:2.2.1'

    // V3
    implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
    implementation 'com.google.android.gms:play-services-basement:17.6.0'
    implementation 'com.google.android.gms:play-services-base:17.6.0'
    implementation 'com.google.android.gms:play-services-gcm:17.0.0'
    implementation 'com.google.android.gms:play-services-location:18.0.0'
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

我什至不知道在哪里看,也许有人会告诉我并纠正我的错误。尽管似乎所有操作都是从 Github 上的库存储库和迁移页面执行的(尽管仍然存在旧版本)

标签: androidgoogle-maps

解决方案


推荐阅读