You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
Android
iOS
Linux
macOS
Web
Windows
Steps to reproduce
Create a Flutter project and add geolocator: ^13.0.1 to pubspec.yaml.
Configure android/app/build.gradle as shown above.
Attempt to build the project for Android (flutter build apk or flutter run on a physical Android device).
The build fails with the LocationRequest.Builder error.
This error only happen in android not on ios
Expected results
The app should compile and run successfully on Android devices, allowing geolocation to work as expected without build errors.
Actual results
C:\Users\cacen\AppData\Local\Pub\Cache\hosted\pub.dev\geolocator_android-4.6.1\android\src\main\java\com\baseflow\geolocator\location\FusedLocationClient.java:102: error: cannot find symbol
LocationRequest.Builder builder = new LocationRequest.Builder(0);
^
symbol: class Builder
location: class LocationRequest
C:\Users\cacen\AppData\Local\Pub\Cache\hosted\pub.dev\geolocator_android-4.6.1\android\src\main\java\com\baseflow\geolocator\location\FusedLocationClient.java:102: error: cannot find symbol
LocationRequest.Builder builder = new LocationRequest.Builder(0);
^
symbol: class Builder
location: class LocationRequest
2 errors
Doctor summary (to see all details, run flutter doctor -v):[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22631.4317], locale en-GB)[√] Windows Version (Installed version of Windows is version 10 or higher)[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)[√] Chrome - develop for the web[X] Visual Studio - develop Windows apps X Visual Studio not installed; this is necessary to develop Windows apps. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components[√] Android Studio (version 2024.1)[√] VS Code (version 1.94.2)[√] Connected device (4 available)[√] Network resources
The text was updated successfully, but these errors were encountered:
Any luck in resolving? I have been fighting the same issue for some time.. Nothing I have tried has worked. Thanks!
No luck brother, I try to lower down the version, clear the cache, clear the project, rebuild everything, and still it didnt work. Good to see I'm not the only one having this problem.
Any luck in resolving? I have been fighting the same issue for some time.. Nothing I have tried has worked. Thanks!
No luck brother, I try to lower down the version, clear the cache, clear the project, rebuild everything, and still it didnt work. Good to see I'm not the only one having this problem.
I sorted it out. Make sure your play-services-location is updated in your grade file.
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
Create a Flutter project and add geolocator: ^13.0.1 to pubspec.yaml.
Configure android/app/build.gradle as shown above.
Attempt to build the project for Android (flutter build apk or flutter run on a physical Android device).
The build fails with the LocationRequest.Builder error.
This error only happen in android not on ios
Expected results
The app should compile and run successfully on Android devices, allowing geolocation to work as expected without build errors.
Actual results
C:\Users\cacen\AppData\Local\Pub\Cache\hosted\pub.dev\geolocator_android-4.6.1\android\src\main\java\com\baseflow\geolocator\location\FusedLocationClient.java:102: error: cannot find symbol
LocationRequest.Builder builder = new LocationRequest.Builder(0);
^
symbol: class Builder
location: class LocationRequest
C:\Users\cacen\AppData\Local\Pub\Cache\hosted\pub.dev\geolocator_android-4.6.1\android\src\main\java\com\baseflow\geolocator\location\FusedLocationClient.java:102: error: cannot find symbol
LocationRequest.Builder builder = new LocationRequest.Builder(0);
^
symbol: class Builder
location: class LocationRequest
2 errors
Code sample
This is what i have in the build.gradle
Screenshots or video
Screenshots or video demonstration
[Upload media here]
Version
geolocator: ^13.0.1
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: