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

[Bug]: java.lang.NoSuchMethodError on Android 5.0 (SDK 21) #1392

Open
3 of 5 tasks
zysc8313 opened this issue Oct 5, 2024 · 0 comments
Open
3 of 5 tasks

[Bug]: java.lang.NoSuchMethodError on Android 5.0 (SDK 21) #1392

zysc8313 opened this issue Oct 5, 2024 · 0 comments

Comments

@zysc8313
Copy link

zysc8313 commented Oct 5, 2024

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

call Permission.systemAlertWindow.isGranted on android 5.0 device

Expected results

Don't make exceptions

Actual results

Exception java.lang.NoSuchMethodError: No static method canDrawOverlays(Landroid/content/Context;)Z in class Landroid/provider/Settings; or its super classes (declaration of 'android.provider.Settings' appears in /system/framework/framework.jar:classes2.dex)
at com.baseflow.permissionhandler.PermissionManager.determinePermissionStatus (PermissionManager.java:237)
at com.baseflow.permissionhandler.PermissionManager.checkPermissionStatus (PermissionManager.java:1)
at com.baseflow.permissionhandler.MethodCallHandlerImpl.onMethodCall (MethodCallHandlerImpl.java:143)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage (MethodChannel.java:18)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler (DartMessenger.java:19)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0 (DartMessenger.java:42)
at android.os.Handler.handleCallback (Handler.java:739)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:145)
at android.app.ActivityThread.main (ActivityThread.java:5938)
at java.lang.reflect.Method.invoke
at java.lang.reflect.Method.invoke (Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1389)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1184)

Code sample

Code sample
Permission.systemAlertWindow.isGranted

Screenshots or video

Screenshots or video demonstration

[Upload media here]

Version

11.3.1

Flutter Doctor output

Doctor output
Flutter (Channel stable, 3.24.2, on macOS 12.7.6 21H1320 darwin-x64, locale
    en-CN)
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

1 participant