phoenixmagento
phoenixmagento

Reputation: 133

Unhandled Exception: MissingPluginException(No implementation found for method getLocation on channel lyokone/location)

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

Answers (5)

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

Mike6679
Mike6679

Reputation: 6136

flutter clean was not enough and did not fix the issue.

I also had to:

  1. Run menu > "Stop Debugging"
  2. Run menu > "Run Without Debugging"

Upvotes: 0

broderbluff
broderbluff

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

Wimukthi Rajapaksha
Wimukthi Rajapaksha

Reputation: 1019

Try terminating your current running project and re-running. It will work. Refer this for more details.

Upvotes: 2

Yauheni Prakapenka
Yauheni Prakapenka

Reputation: 1754

I had this problem when the proxy debugger (Proxyman or Charles) was started on my computer.

This worked for me:

  1. Close proxy debugger
  2. flutter clean
  3. Restart IDE
  4. Build app

Upvotes: 3

Related Questions