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

MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods) #586

Closed
1 task
huangsir0 opened this issue Jun 9, 2021 · 8 comments

Comments

@huangsir0
Copy link

MissingPluginException

MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods)

Version: permission_handler ^7.1.0

kotlin: ext.kotlin_version = '1.4.10'

doctor

[✓] Flutter (Channel stable, 2.2.0, on macOS 11.2.3 20D91 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.56.2)
[✓] Connected device (4 available)

Platform:

  • 🤖 Android
@mvanbeusekom
Copy link
Member

Hi @huangsir0,

To resolve this problem please try the following:

  1. Make sure you added the necessary permissions to your AndroidManifest.xml file;
  2. Make sure your Application is migrated to use AndroidX (see migration guide);
  3. Run the flutter clean command in the root of your project;
  4. If you are using Android Studio or IntelliJ run the Invalidate caches/ Restart option.

If the above doesn't work please have a look at this issue.

Other related issues that might help:

I am going to close this issue as this doesn't seem related to the plugin itself but more the user environment. However if you have any follow up questions don't hesitate to leave another comment.

@Farial-mahmod
Copy link

@mvanbeusekom , Thanks for your reply. I have tried your instructions but the error still seems to persist .

@mvanbeusekom
Copy link
Member

@Farial-mahmod which platform are you targeting? Note that permission_handler doesn't (yet) support web and Linux.

@CristiCh
Copy link

CristiCh commented Oct 8, 2024

I have the same error when running on ios device:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)
<asynchronous suspension>
#1      MethodChannelPermissionHandler.checkPermissionStatus (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:17:20)
<asynchronous suspension>
#2      requestNotificationPermission (package:bmicalculator/main.dart:11:16)
<asynchronous suspension>
#3      main (package:bmicalculator/main.dart:21:3)
<asynchronous suspension>
the Dart compiler exited unexpectedly.

Can anyone please help?

@CristiCh
Copy link

CristiCh commented Oct 9, 2024

Here is where I use the permission_handler

import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:permission_handler/permission_handler.dart';

Future<void> requestNotificationPermission() async {
  if (await Permission.notification.isDenied) {
    await Permission.notification.request();
  }
}

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await requestNotificationPermission(); // Request permission on app launch

  runApp(MyApp());
}

@mvanbeusekom
Copy link
Member

Hi @CristiCh,

Can you check the versions of the permission_handler and permission_handler_apple packages in your pubspec.lock file?

Could be a mismatch there. Also which version of the permission_handler are you using? Can you update to the latest version using:

flutter pub update permission_handler
flutter pub update permission_handler_apple

@CristiCh
Copy link

CristiCh commented Oct 9, 2024

Hi @CristiCh,

Can you check the versions of the permission_handler and permission_handler_apple packages in your pubspec.lock file?

Could be a mismatch there. Also which version of the permission_handler are you using? Can you update to the latest version using:

flutter pub update permission_handler
flutter pub update permission_handler_apple

Hi @mvanbeusekom,

I only had permission_handler: ^11.3.1 in pubspec.yaml. Do I also need to add the permission_handler_apple?

Thank you very much!

@mvanbeusekom
Copy link
Member

No the permission_handler package depends on the permission_handler_apple package and will automatically be downloaded.

You can check the version in the pubspec.lock file that should be added in the root of your application (note the extension .lock and not the .yaml file).

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

4 participants