Richou / react-native-android-location-enabler

Display a GoogleMap like android popup to ask for user to enable location services if disabled
MIT License
202 stars 51 forks source link

could not invoke RNAndroidLocationEnabler.promptForEnableLocationIfNeeded. found interface com.google.android.gms.location.settingsclient, but class was expected #99

Closed JeanMarieK closed 11 months ago

JeanMarieK commented 11 months ago

I'm getting this error on my physical device screen after running the app: could not invoke RNAndroidLocationEnabler.promptForEnableLocationIfNeeded. found interface com.google.android.gms.location.settingsclient, but class was expected (declaration of 'com.google.android.gms.location.SettingsClient' appears in /data/app/~~dQIJYPyV_0zb5PG-2RsSMg==/applicationId-s0 mk9yoRtp0KWm9j-w-wQ==/ base.apk)

276382056-3ee16be4-e31f-4a78-9f54-dd7ab937cb82

react-native version 0.66.4 "react-native-android-location-enabler": "^1.2.2"

Richou commented 11 months ago

Can you try this https://github.com/Baseflow/flutter-geolocator/issues/1214#issuecomment-1419562502 ? The comment was for a flutter project but maybe it will work for your issue.

JeanMarieK commented 11 months ago

Can you try this Baseflow/flutter-geolocator#1214 (comment) ? The comment was for a flutter project but maybe it will work for your issue.

It worked. I only added "force "com.google.android.gms:play-services-location:21.0.1" in resolutionStrategy {}. Thanks a lot!

ksd711 commented 10 months ago

Can you try this Baseflow/flutter-geolocator#1214 (comment) ? The comment was for a flutter project but maybe it will work for your issue.

this work for me