1

I am experiencing a problem with mapbox-android-navigation:

Failed to resolve: com.mapbox.navigator:mapbox-navigation-native:3.1.3 | MAPBOX**

enter image description here

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.5.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.8.2'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.20.0'
    implementation ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.20.0'){
        transitive = true
    }
}
kenlukas
  • 3,616
  • 9
  • 25
  • 36

2 Answers2

3

Try to add

allprojects { repositories { ... maven { url 'https://mapbox.bintray.com/mapbox' } } }

to your Project Root build.gradle file

0

In case of ERROR: Failed to resolve: com.mapbox.navigator:mapbox-navigation-native:5.0.0

Please make sure it's in the right spot:

buildscript {
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()
        maven { url 'https://mapbox.bintray.com/mapbox' }
    }
}
Carlos Espinoza
  • 1,115
  • 11
  • 13