FusedLocationProviderClient Issue

Please provide the following:

  1. SDK Version: 49.0.11
  2. Platforms(Android/iOS/web/all): Android
  3. expo-location

Hi,

I am using expo-location to get the users geolocation and having no issues when running it via Expo Go or Android Studio Virtual Device but when I create a build (apk) and install it on my phone I get the following error via Sentry.

“Encountered an exception while calling native method: Exception occurred while executing exported method getCurrentPositionAsync on module ExpoLocation: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expect…”

It askes for location permissions but then errors and doesn’t get the location data. I am at a complete lose as to how to fix this issue.

Please help.
Andrew

Have the same issue. From google documentation :

October 13, 2022
The latest update to the play-services-location library includes the following changes:

https://developers.google.com/android/guides/releases#october_13_2022

FusedLocationProviderClient, ActivityRecognitionClient, GeofencingClient and SettingsClient are now interfaces instead of classes, which helps enforce correct usage and improves testability.
Added LocationRequest.Builder class as the preferred method of constructing LocationRequest, and deprecated old methods of construction.
CurrentLocationRequest.Builder and LastLocationRequest.Builder are now final.
PendingIntent based APIs invoked by instant apps will now correctly fail instead of never delivering results.

***Warning***: This release of play-services-location (21.0.0) has a known issue that can break SettingsClient APIs. All clients should update to the 21.0.1 release of play-services-location which fixes this issue.

It basicaly says that FusedLocationProviderClient was refactored from a class to an interface. And expo-location module uses class FusedLocationProviderClient that can’t be find as it is not a class anymore.

Don’t have a solution yet, I’ve submitted the same issue yesterday

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.