我在Android studio中尝试使用mapbox时遇到这个问题
无法解析:com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0
问题是什么?
我的 build.gradle 依赖项
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0'
}
我的 build.gradle 项目
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://mapbox.bintray.com/mapbox' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
只是解释得很糟糕。你必须制作一个私人令牌。公共令牌不起作用。当您创建令牌时,有一个带有“读取:下载”的字段,只需标记它并生成您的令牌。这个令牌应该可以工作。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)