java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected #7782
Unanswered
mchakkarwar
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have forked v1.5.0 mapbox navigation sdk. I have upgraded maplibre version v9.4.0 to v10.0.2.
I have added google play location service v21.0.1. The app is crashing on launch, getting below error;
java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in /data/app/com.mapbox.navigation.examples-Ubm9hun6-zHxEvDCqx6fgA==/base.apk)
Please find stack trace below;
java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in /data/app/com.mapbox.navigation.examples-Ubm9hun6-zHxEvDCqx6fgA==/base.apk)
at com.mapbox.android.core.location.GoogleLocationEngineImpl.getLastLocation(GoogleLocationEngineImpl.java:50)
at com.mapbox.android.core.location.LocationEngineProxy.getLastLocation(LocationEngineProxy.java:25)
at com.mapbox.navigation.examples.ui.CustomUIComponentStyleActivity.onMapReady$lambda$4(CustomUIComponentStyleActivity.kt:210)
at com.mapbox.navigation.examples.ui.CustomUIComponentStyleActivity.$r8$lambda$8HgQ9fAUsVRKgmpouuI5X-oBAhI(Unknown Source:0)
at com.mapbox.navigation.examples.ui.CustomUIComponentStyleActivity$$ExternalSyntheticLambda1.onStyleLoaded(Unknown Source:4)
at com.mapbox.mapboxsdk.maps.MapboxMap.notifyStyleLoaded(MapboxMap.java:962)
at com.mapbox.mapboxsdk.maps.MapboxMap.onFinishLoadingStyle(MapboxMap.java:224)
at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onDidFinishLoadingStyle(MapView.java:1346)
at com.mapbox.mapboxsdk.maps.MapChangeReceiver.onDidFinishLoadingStyle(MapChangeReceiver.java:198)
at com.mapbox.mapboxsdk.maps.NativeMapView.onDidFinishLoadingStyle(NativeMapView.java:1124)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:197)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
I observed that it is working with v20 google play location service. And it is crashing when used google play location service 21 and above.
Please help to get rid of this issue.
Beta Was this translation helpful? Give feedback.
All reactions