Reputation: 11
I tried to run a project from github ( https://github.com/londonappbrewery/Clima-Flutter-Completed ). This is weather app and uses a device's location to give results about the weather. In this project Geolocator package was used to get a device's location. The code is using geolocator: ^3.0.1.
When I run the app it crashes and I got this error:
The plugins geolocator, google_api_availability, permission_handler
use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods) 401
So what I understand is basically the app is not able to access the location because Geolocator package uses a deprecated version of Android embedding.
Then I googled this error and found the official guide of the Geolocator package's author to solve this error ( https://github.com/Baseflow/flutter-permission-handler/issues/586 )
I followed all the steps but the code kept running for more than an hour but didn't finish running.
I did a lot of research on this but nothing worked. Can someone please guide me on how to solve this?
Upvotes: 0
Views: 76
Reputation: 71
Maybe you using the old packages. you can simply run flutter packages upgrade
in your project to upgrade all the packages
or run the below command on terminal it will update to major versions
flutter pub upgrade --major-versions
Upvotes: 0