我已经从 Mapbox 创建了所需的帐户和密钥。我以不同的顺序列出了存储库,但没有运气。构建时出现如下错误:
无法解析配置“:app:debugRuntimeClasspath”的所有文件。
找不到 com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0。在以下位置搜索: - 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.pom 必需:项目: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'] …
Run Code Online (Sandbox Code Playgroud)