Why Is Mapbox-android Sdk Not Resolving From Build.gradle?
I'm trying to setup the basic tutorial here but i am blocked by errors in Android Studio: https://docs.mapbox.com/android/maps/overview/#install-the-maps-sdk Error 1: seen when i S
Solution 1:
You can remove the following line
implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:9.4.0'){
exclude group: 'group_name', module: 'module_name'
}
You're probably missing the maven
block as seen in step #5 of https://docs.mapbox.com/android/maps/overview/#add-the-dependency. Make sure you add it.
Also, have you created a secret token with the right scope? See the second bullet point (A secret access token with the...
) at https://docs.mapbox.com/android/maps/overview/#configure-credentials
Solution 2:
You need to configure the MapBox repository:
allprojects {
repositories {
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = 'mapbox'
// Use the secret token you stored in gradle.properties as the password
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
}
Solution 3:
In my case
MAPBOX_DOWNLOADS_TOKEN="PASTE_YOUR_SECRET_TOKEN_HERE" instead of MAPBOX_DOWNLOADS_TOKEN=PASTE_YOUR_SECRET_TOKEN_HERE.
Just removed quotes and it worked.Just try this.
Solution 4:
i also faced this issue , isolved it by using an old version of mapbox the new version has some issue connecting to the mapbox server
try using this or some other version
dependencies{
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.0.0'
}
allprojects {
repositories {
...
mavenCentral()
}
}
Solution 5:
i had changed the username to my own name. apparently it should remain as "mapbox".
Post a Comment for "Why Is Mapbox-android Sdk Not Resolving From Build.gradle?"