themmfa
themmfa

Reputation: 539

Unhandled Exception: MissingPluginException error flutter

I'm using permission_handler package and getting this error.

    [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method checkServiceStatus on channel flutter.baseflow.com/permissions/methods)
E/flutter (17382): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:165:7)
E/flutter (17382): <asynchronous suspension>
E/flutter (17382): #1      MethodChannelPermissionHandler.checkServiceStatus (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:45:20)
E/flutter (17382): <asynchronous suspension>
E/flutter (17382): #2      FutureServiceStatusGetters.isEnabled (package:permission_handler_platform_interface/src/service_status.dart:61:40)

The awkward part is when my friend compile and run the same code, it works perfectly. I don't know what to do. I tried every single solution on internet but no luck yet.What could be the problem?

    [✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm, locale
    en-TR)
    • Flutter version 2.8.1 at /Users/fatiherdogan/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (7 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/fatiherdogan/Library/Android/sdk
    • Platform android-32, build-tools 32.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.63.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.32.0

[✓] Connected device (2 available)
    • ANE LX1 (mobile) • 89U4C18629000385 • android-arm64  • Android 9 (API 28)
    • Chrome (web)     • chrome           • web-javascript • Google Chrome
      97.0.4692.99

Upvotes: 2

Views: 8267

Answers (3)

Saiful Islam
Saiful Islam

Reputation: 599

if it happened on android try like this...

also check this similar issue is here. maybe you will find some idea.

  1. Add the following to your "gradle.properties" file:

    android.useAndroidX=true

    android.enableJetifier=true

  2. Make sure you set the compileSdkVersion in your "android/app/build.gradle" file to 31:

    android { compileSdkVersion 31 ... }

Upvotes: 1

themmfa
themmfa

Reputation: 539

I solved the problem with;

Deleting android studio and download it again.Also deleted the flutter files and download it again.

Upvotes: -4

nagendra nag
nagendra nag

Reputation: 1342

Try flutter clean, deleting the pubspec.lock file.

Then run flutter pub get and then flutter run.

Upvotes: 3

Related Questions