当我尝试在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
}
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.6.7'
会有所帮助。 - RickertBrandsen