Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.6k stars 291 forks source link

GooglePlayServicesIncorrectManifestValueException at getCurrentPosition() #330

Open yeyintkoko opened 2 years ago

yeyintkoko commented 2 years ago

The package is crashing when it call com.agontuk.RNFusedLocation.LocationUtils.isGooglePlayServicesAvailable() in android. Could you please put a try/catch on that function in android?

Fatal Exception: com.google.android.gms.common.GooglePlayServicesIncorrectManifestValueException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 12451000 but found 4323000.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
       at com.google.android.gms.common.GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(com.google.android.gms:play-services-basement@@18.0.0:32)
       at com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(com.google.android.gms:play-services-basement@@18.0.0:2)
       at com.google.android.gms.common.GoogleApiAvailability.isGooglePlayServicesAvailable(com.google.android.gms:play-services-base@@18.0.0:2)
       at com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(com.google.android.gms:play-services-basement@@18.0.0:1)
       at com.google.android.gms.common.GoogleApiAvailability.isGooglePlayServicesAvailable(com.google.android.gms:play-services-base@@18.0.0:1)
       at com.agontuk.RNFusedLocation.LocationUtils.isGooglePlayServicesAvailable(LocationUtils.java:47)
       at com.agontuk.RNFusedLocation.RNFusedLocationModule.createLocationProvider(RNFusedLocationModule.java:148)
       at com.agontuk.RNFusedLocation.RNFusedLocationModule.getCurrentPosition(RNFusedLocationModule.java:76)
Agontuk commented 2 years ago

You've multiple version of the same play services library installed, make sure all libraries have the same version including location.