Can't use specific methods in Mapbox LocationE

2019-09-14 20:22发布

问题:

I was trying to set up my own navigation app, but i can't use the methods listed here: https://github.com/mapbox/mapbox-java/blob/master/mapbox/app/src/main/java/com/mapbox/services/android/testapp/nav/NavigationActivity.java

In details i'm referring at locationEngine.setInterval(0); and locationEngine.setSmallestDisplacement(3.0f); , if used Android Studio complains that they're not existing.

I've added the references to the latest mapbox-services snapshot as stated in the homepage of the github project.

What i'm missing?

回答1:

Inside the readme, the SNAPSHOT snippet is only suggesting one dependency when Mapbox Services has 7.

repositories {
    mavenCentral()
    maven { url "http://oss.sonatype.org/content/repositories/snapshots/"}
}

dependencies {
    compile 'com.mapbox.mapboxsdk:mapbox-android-ui:2.1.0-SNAPSHOT'
}

see the documentation for more details.