当我执行" react -native run-android“时,我在react native中遇到了这个问题。所以,这不是我的代码的问题,而是站点"https://mapbox.bintray.com/“返回错误403的问题:禁止?因此,我必须等待他们修复这个服务器?
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.mapbox.navigator:mapbox-navigation-native:6.2.1.
Required by:
project :app > com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.1 > com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.1
> Could not resolve com.mapbox.navigator:mapbox-navigation-native:6.2.1.
> Could not get resource 'https://mapbox.bintray.com/mapbox/com/mapbox/navigator/mapbox-navigation-native/6.2.1/mapbox-navigation-native-6.2.1.pom'.
> Could not GET 'https://mapbox.bintray.com/mapbox/com/mapbox/navigator/mapbox-navigation-native/6.2.1/mapbox-navigation-native-6.2.1.pom'. Received status code 403 from server: Forbidden
发布于 2021-09-21 17:15:14
您可以按照以下说明添加存储库引用:
使用DOWNLAODS:READ作用域创建一个新的秘密Mapbox访问令牌,您可以在https://docs.mapbox.com/android/navigation/guides/install/#configure-credentials上阅读更多内容
将maven存储库配置添加到build.gradle文件,这是https://docs.mapbox.com/android/navigation/guides/install/#add-the-dependency的第六点
allprojects {
repositories {
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 as the password
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
}
参考资料:
https://github.com/mapbox/mapbox-navigation-android/issues/4533#issuecomment-880672321
https://stackoverflow.com/questions/68373113
复制相似问题