Flutter app crashes on start - Found interface com.google.android.gms.location.SettingsClient, but class was expected
Asked Answered
K

0

6

Suddenly the Flutter app started crashing on open. It was working earlier. Sharing the runtime crash log -

Fatal Exception: java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.SettingsClient, but class was expected (declaration of 'com.google.android.gms.location.SettingsClient' appears in /data/app/com.test.app-AqARftTPn1XJdiHWXXbkBw==/base.apk!classes6.dex)
       at com.baseflow.geolocator.location.FusedLocationClient.isLocationServiceEnabled(FusedLocationClient.java:83)
       at com.baseflow.geolocator.location.GeolocationManager.isLocationServiceEnabled(GeolocationManager.java:45)
       at com.baseflow.geolocator.MethodCallHandlerImpl.onIsLocationServiceEnabled(MethodCallHandlerImpl.java:138)
       at com.baseflow.geolocator.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:62)
       at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
       at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
       at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
       at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(:12)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:201)
       at android.app.ActivityThread.main(ActivityThread.java:6810)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Kiowa answered 9/11, 2022 at 13:10 Comment(2)
Did you find a solution to this, as I have the same issue.Scheider
I think the below link might help you. https://mcmap.net/q/887880/-java-lang-incompatibleclasschangeerror-found-interface-com-google-android-gms-location-settingsclient-closedMonoacid

© 2022 - 2024 — McMap. All rights reserved.