Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

private usage of Lost incompatible with Mapbox 5.1.0+ #9609

Closed
paulVulog opened this issue Jul 25, 2017 · 1 comment
Closed

private usage of Lost incompatible with Mapbox 5.1.0+ #9609

paulVulog opened this issue Jul 25, 2017 · 1 comment
Labels
Android Mapbox Maps SDK for Android

Comments

@paulVulog
Copy link

Hi,

I am using the Lost library for some personal usage in my app.
I also use Mapbox.
Since the latest version I get a crash. I think it's because of Lost rollback to 1.1.1.

Here is my configuration :

In a personal sdk project that I use in my app :

dependencies {
	...
	compile "com.mapzen.android:lost:3.0.2"
	...
}

In my app project:

dependencies {
	...
	//my sdk
	debugCompile project(path: ':sdk', configuration: "debug")

	//MapBox
	compile("com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.1@aar") {
		transitive = true
	}
	compile ("com.mapbox.mapboxsdk:mapbox-android-services:2.1.3@aar"){
		transitive=true
	}
	...
}

if I run the app I get a crash during the initialization :

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.my.package.debug, PID: 8757
	java.lang.NoSuchMethodError: No interface method requestLocationUpdates(Lcom/mapzen/android/lost/api/LocationRequest;Lcom/mapzen/android/lost/api/LocationListener;)V in class Lcom/mapzen/android/lost/api/FusedLocationProviderApi; or its super classes (declaration of 'com.mapzen.android.lost.api.FusedLocationProviderApi' appears in /data/app/com.may.package.debug-2/split_lib_dependencies_apk.apk:classes17.dex)
	at com.mapbox.mapboxsdk.location.LocationSource.requestLocationUpdates(LocationSource.java:123)
	at com.mapbox.services.android.telemetry.MapboxTelemetry.onConnected(MapboxTelemetry.java:375)
	at com.mapbox.mapboxsdk.location.LocationSource.activate(LocationSource.java:57)
	at com.mapbox.services.android.telemetry.MapboxTelemetry.registerLocationUpdates(MapboxTelemetry.java:370)
	at com.mapbox.services.android.telemetry.MapboxTelemetry.setTelemetryEnabled(MapboxTelemetry.java:312)
	at com.mapbox.services.android.telemetry.MapboxTelemetry.loadUserPreferences(MapboxTelemetry.java:282)
	at com.mapbox.services.android.telemetry.MapboxTelemetry.initialize(MapboxTelemetry.java:134)
	at com.mapbox.services.android.telemetry.MapboxTelemetry.initialize(MapboxTelemetry.java:103)
	at com.mapbox.mapboxsdk.Mapbox.getInstance(Mapbox.java:51)

It looks like Mapbox in my app is using the Lost 3.0.2 library from my sdk instead of the version 1.1.1.
Is there a way / gradle configuration to perform what I need to do ?
Not sure if this issue can be linked to this one : #9581
If I move mapbox to the version 5.1.0-beta.5@aar, everything works fine (same Lost version)
Any ideas ?
Thanks !

@Guardiola31337 Guardiola31337 added the Android Mapbox Maps SDK for Android label Jul 25, 2017
@tobrun
Copy link
Member

tobrun commented Jul 25, 2017

@paulVulog gradle in normal cases will always select the latest version of the dependency. You can verify this with ./gradlew :module_name:dependencies . There are configurations possible to exclude modules from dependencies though mapbox will only function with 1.1.1, we are looking into bumping to a newer version in #9581. More detailed information in troubleshooting this issue in #9408

@tobrun tobrun closed this as completed Jul 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

3 participants