mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

Crash due to class naming collision in 0.12.0

Open tonyc10 opened this issue 8 years ago • 5 comments

Android API: 27 **Mapbox Navigation SDK version: 0.12.0 **

Hi —

I’m seeing a bug in the code of your new navigation libraries, with different versions of a class called FeatureCollection. One version is com.mapbox.services.commons.geojson.FeatureCollection The other is com.mapbox.geojson.FeatureCollection

The class MapUtils (com.mapbox.services.android.navigation.ui.v5.utils) gets it mixed-up.

On line 43 it instantiates GeoJsonSource,

new GeoJsonSource(sourceId, collection, routeGeoJsonOptions);

Where collection is a com.mapbox.services.commons.geojson.FeatureCollection However, GeoJsonSource, expects a com.mapbox.geojson.FeatureCollection.

This is causing a crash in my app, while I am trying to get NavigationMapRoute.addRoute( :DirectionsRoute) to draw a route for me.

I am using the following map-box libraries:

implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.0.1' implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.12.0' implementation ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.12.0') { transitive = true } implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.5.0' implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-traffic:0.4.0' implementation ('com.mapbox.mapboxsdk:mapbox-android-geocoder:1.0.0@aar'){ transitive=true }

Any ideas?

tonyc10 avatar Apr 27 '18 19:04 tonyc10

Hey @tonyc10 šŸ‘‹ thanks for reaching out and report your problem.

This should be fixed now (#697 landed last week) and it'll be available in the next release. In the meantime, could you please retest this using 0.13.0-SNAPSHOT and report back if it's still an issue?

Following you can find installation instructions for SNAPSHOTs:

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

dependencies {
    // ...
    implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.13.0-SNAPSHOT'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.13.0-SNAPSHOT'
    // ...
}

Thanks again!

Guardiola31337 avatar Apr 30 '18 17:04 Guardiola31337

Yes -- This issue is fixed for me in 0.13.0-SNAPSHOT. Thanks!

On Mon, Apr 30, 2018 at 12:47 PM, Pablo Guardiola [email protected] wrote:

Hey @tonyc10 https://github.com/tonyc10 šŸ‘‹ thanks for reaching out and report your problem.

This should be fixed now (#697 https://github.com/mapbox/mapbox-navigation-android/pull/697 landed last week) and it'll be available in the next release. In the meantime, could you please retest this using 0.13.0-SNAPSHOT and report back if it's still an issue?

Following you can find installation instructions for SNAPSHOTs:

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

dependencies { // ... implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.13.0-SNAPSHOT' implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.13.0-SNAPSHOT' // ... }

Thanks again!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mapbox/mapbox-navigation-android/issues/897#issuecomment-385475140, or mute the thread https://github.com/notifications/unsubscribe-auth/ADjrbdK4wmp9mk3faX1jSOBsUBGQxDf4ks5tt04egaJpZM4Tq6bh .

tonyc10 avatar May 01 '18 13:05 tonyc10

@tonyc10 glad to hear, thanks for the update!

It'll be included in the next release. We'll keep you posted.

Closing here.

Guardiola31337 avatar May 01 '18 14:05 Guardiola31337

Hi Pablo,

You recently referred to not receiving any voice instructions when starting to use 0.13.0 ( https://github.com/mapbox/mapbox-navigation-android/issues/750)

How did you resolve that? I also am not seeing (hearing) any voice since I've moved up to 0.13.0

Tony

On Mon, Apr 30, 2018 at 12:47 PM, Pablo Guardiola [email protected] wrote:

Hey @tonyc10 https://github.com/tonyc10 šŸ‘‹ thanks for reaching out and report your problem.

This should be fixed now (#697 https://github.com/mapbox/mapbox-navigation-android/pull/697 landed last week) and it'll be available in the next release. In the meantime, could you please retest this using 0.13.0-SNAPSHOT and report back if it's still an issue?

Following you can find installation instructions for SNAPSHOTs:

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

dependencies { // ... implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.13.0-SNAPSHOT' implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.13.0-SNAPSHOT' // ... }

Thanks again!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mapbox/mapbox-navigation-android/issues/897#issuecomment-385475140, or mute the thread https://github.com/notifications/unsubscribe-auth/ADjrbdK4wmp9mk3faX1jSOBsUBGQxDf4ks5tt04egaJpZM4Tq6bh .

tonyc10 avatar May 07 '18 19:05 tonyc10

Hey @tonyc10 šŸ‘‹ thanks for reaching out and report your problem.

This is being tracked in https://github.com/mapbox/mapbox-navigation-android/issues/922

Could you add some more information for reproducing the issue (minimal example) or any other specifics around your test setup in that ticket? Do you have some more information on used device? If there is any sample or pseudo code you can provide that would be really helpful.

Guardiola31337 avatar May 16 '18 15:05 Guardiola31337