androidbuild.gradlemapbox-android

How to solve : Failed to resolve: com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0


I face this problem when trying to use mapbox in Android studio
Failed to resolve: com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0

what is the problem?

my build.gradle dependencies


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'
}

my build.gradle project

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
}

Solution

  • How about trying a version, which actually exists?

    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.6.7'