Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]:Issue: Missing Location Permissions in Manifest (Works on iOS) #1626

Open
3 of 8 tasks
Saurav310799 opened this issue Jan 17, 2025 · 1 comment
Open
3 of 8 tasks

Comments

@Saurav310799
Copy link

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • Windows

Your question

I am encountering the following exception:

E/flutter (25474): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: No location permissions are defined in the manifest. Make sure at least ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION are defined in the manifest.
E/flutter (25474): #0      GeolocatorAndroid.checkPermission (package:geolocator_android/src/geolocator_android.dart:50:7)
E/flutter (25474): <asynchronous suspension>
E/flutter (25474): #1      LoginActivityNewState._getLocation (package:aatman/feauters_activity/LoginActivityNew.dart:305:39)
E/flutter (25474): <asynchronous suspension>
E/flutter (25474): #2      LoginActivityNewState.allowLocationAndroid (package:aatman/feauters_activity/LoginActivityNew.dart:292:5)
E/flutter (25474): <asynchronous suspension>

The issue occurs with the following code snippet:

LocationPermission permission = await Geolocator.checkPermission();

Even though I have already defined all the required location permissions (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION, and ACCESS_BACKGROUND_LOCATION) in my AndroidManifest.xml file, I am still encountering this error.The code works perfectly fine on iOS

I have checked the AndroidManifest.xml file thoroughly, and all permissions are correctly defined, but the exception persists.I have also tried upgrading the geolocator plugin version and downgrading it, but the issue still remains.

Any help or insights on what could be causing this issue would be greatly appreciated.

Version

9.0.0

@Saurav310799 Saurav310799 changed the title [Question]: [Question]:Issue: Missing Location Permissions in Manifest (Works on iOS) Jan 17, 2025
@abjainri
Copy link

@Saurav310799 Why are using version: 9.0.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants