Reputation: 133
E/flutter (13237): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method getLocation on channel lyokone/location)
I am using Location and Place picker plugin
Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: plugins.flutter.io/google_maps
Upvotes: 10
Views: 8088
Reputation: 74
Add these line to your android manifest file inside (project_dir/android/app/src/main
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
After run these commands:
```flutter clean```
```flutter pub get```
Then re-start the IDE, run the app again
Upvotes: 0
Reputation: 6136
flutter clean was not enough and did not fix the issue.
I also had to:
Upvotes: 0
Reputation: 470
This error occurs when you add a package that hooks into the device like gps/camera/storage etc. without rebuilding the project.
To solve this, terminate the currently running project from your IDE, or if you're using flutter run
in your terminal just press q
.
Run flutter clean
and then re-run the project again.
Upvotes: 9
Reputation: 1019
Try terminating your current running project and re-running. It will work. Refer this for more details.
Upvotes: 2
Reputation: 1754
I had this problem when the proxy debugger (Proxyman or Charles) was started on my computer.
This worked for me:
flutter clean
Upvotes: 3