skip to Main Content

Flutter: Getting below Exception , while accepting the location permissions

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/~~vK3x6kuSR8MsWIHWo0p-pg==/com.wst.occser-5pgr4NMzu9vj5rO5C1Dcew==/base.apk!classes3.dex) E/AndroidRuntime(15597): at com.lyokone.location.FlutterLocation.startRequestingLocation(FlutterLocation.java:422) E/AndroidRuntime(15597): at com.lyokone.location.FlutterLocation.onRequestPermissionsResultHandler(FlutterLocation.java:131) E/AndroidRuntime(15597): at com.lyokone.location.FlutterLocation.onRequestPermissionsResult(FlutterLocation.java:122) E/AndroidRuntime(15597): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onRequestPermissionsResult(FlutterEngineConnectionRegistry.java:777) E/AndroidRuntime(15597): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onRequestPermissionsResult(FlutterEngineConnectionRegistry.java:409) E/AndroidRuntime(15597): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onRequestPermissionsResult(FlutterActivityAndFragmentDelegate.java:757) E/AndroidRuntime(15597): at io.flutter.embedding.android.FlutterFragment.onRequestPermissionsResult(FlutterFragment.java:915) E/AndroidRuntime(15597): at io.flutter.embedding.android.FlutterFragmentActivity.onRequestPermissionsResult(FlutterFragmentActivity.java:549) E/AndroidRuntime(15597): at…

VIEW QUESTION

Location Permission Status – always getting as denied in Flutter

I have created below method to check the location permission status in my flutter application: Future<void> checkLocationPermission( BuildContext context, UserCredential userCredential) async { locationPermissionStatus = await permission_status.Permission.location .request() .then((value) async { if (locationPermissionStatus.isGranted) { displayToast("granted"); await getCurrentLocation(context, userCredential); } else…

VIEW QUESTION
Back To Top
Search