gpt4 book ai didi

gradle - 找不到 com.mapbox.mapboxsdk :mapbox-android-accounts:0. 7.0

转载 作者:行者123 更新时间:2023-12-04 12:55:19 28 4
gpt4 key购买 nike

我已经创建了 Mapbox 所需的帐户和 key 。我以不同的顺序列出了存储库,但没有运气。构建时,出现以下错误:
无法解析配置“:app:debugRuntimeClasspath”的所有文件。

Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0.Searched in the following locations:- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pomRequired by:project :app > com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.1


这是我的 build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.20"
repositories {
google()
mavenCentral()
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = 'mapbox'
// Use the secret token you stored in gradle.properties
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}


}
dependencies {
classpath "com.android.tools.build:gradle:4.2.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
mavenCentral()

}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
我已将以下内容添加到我的模块级 build.gradle
实现 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.1'

最佳答案

我只加了 jcenter()它有效。然而,jcenter()已弃用。

buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

关于gradle - 找不到 com.mapbox.mapboxsdk :mapbox-android-accounts:0. 7.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68210918/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com