Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method lineWidth not found when creating NavigationMapRoute #437

Closed
cammace opened this issue Oct 30, 2017 · 8 comments
Closed

Method lineWidth not found when creating NavigationMapRoute #437

cammace opened this issue Oct 30, 2017 · 8 comments

Comments

@cammace
Copy link
Contributor

cammace commented Oct 30, 2017

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)

@kuja2007
Copy link

kuja2007 commented Nov 1, 2017

The same issue on my side

@Danny-James
Copy link

I have this same issue.

@kuja2007
Copy link

kuja2007 commented Nov 1, 2017

Hi guys,

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

@kuja2007
Copy link

kuja2007 commented Nov 1, 2017

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

@Danny-James
Copy link

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

@rheng001
Copy link

rheng001 commented Nov 6, 2017

Facing same issue as well

@cammace
Copy link
Contributor Author

cammace commented Nov 7, 2017

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.

@kotdroidZero
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants