Skip to content

Method lineWidth not found when creating NavigationMapRoute #437

Closed

Description

@cammace

Originally ticketed in Mapbox Java by @turey

Platform:
LG-H871
Android 7.0

Mapbox Services version:
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:5.2.0-beta.1@aar') {
transitive=true
}
compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.3.0-SNAPSHOT'
compile 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.7.0-SNAPSHOT'
compile ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.7.0-SNAPSHOT') {
transitive = true
}

Steps to trigger behavior

  1. Create the app described in https://www.mapbox.com/help/android-navigation-sdk/
  2. Run the app.
  3. Click on the map.

Expected behavior

The pin will appear on the map and a route will be drawn to it.

Actual behavior

E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoSuchMethodError: No static method lineWidth(Lcom/mapbox/mapboxsdk/style/functions/CameraFunction;)Lcom/mapbox/mapboxsdk/style/layers/PropertyValue; in class Lcom/mapbox/mapboxsdk/style/layers/PropertyFactory; or its super classes (declaration of 'com.mapbox.mapboxsdk.style.layers.PropertyFactory' appears in /data/app/com.hall.thomas.test-2/split_lib_dependencies_apk.apk:classes19.dex)
at com.mapbox.services.android.navigation.ui.v5.route.NavigationMapRoute.addNavigationRouteLayer(NavigationMapRoute.java:371)
at com.mapbox.services.android.navigation.ui.v5.route.NavigationMapRoute.initialize(NavigationMapRoute.java:179)
at com.mapbox.services.android.navigation.ui.v5.route.NavigationMapRoute.(NavigationMapRoute.java:156)
at com.mapbox.services.android.navigation.ui.v5.route.NavigationMapRoute.(NavigationMapRoute.java:135)

Activity

  1. kuja2007 commented on Nov 1, 2017

    @kuja2007

    The same issue on my side

  2. Danny-James commented on Nov 1, 2017

    @Danny-James

    I have this same issue.

  3. kuja2007 commented on Nov 1, 2017

    @kuja2007

    Hi guys,

    Do you need additional data to reproduce this issue?
    If yes please let me know.

  4. kuja2007 commented on Nov 1, 2017

    @kuja2007

    Simple fix.
    If you include class "NavigationMapRoute" locally to the project issue is fixed.

  5. Danny-James commented on Nov 2, 2017

    @Danny-James

    @cammace Any News On This? As I'm Unable To Continue Development Until This Issue Is Resolved.

  6. rheng001 commented on Nov 6, 2017

    @rheng001

    Facing same issue as well

  7. cammace commented on Nov 7, 2017

    @cammace
    Author

    As @kuja2007 mentioned, this seems to be a mistake in the documentation rather than a bug existing in the codebase since running the testapp doesn't show this crash. Please review your code and if you are still having issues, please provide a way for me to reproduce the crash.

  8. kotdroidZero commented on Apr 23, 2019

    @kotdroidZero

    How can we use NavigationMapRoute class with OpenStreetMap instead of MapBox in android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions