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)

Stack Overflow | TheUnreal | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    No static method canDrawOverlays

    Stack Overflow | 7 months ago | TheUnreal
    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)

    Root Cause Analysis

    1. 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)

      at com.pack.MainActivity.checkDrawOverlayPermission()
    2. com.pack
      MainActivity.onCreate
      1. com.pack.MainActivity.checkDrawOverlayPermission(MainActivity.java:311)
      2. com.pack.MainActivity.onCreate(MainActivity.java:127)
      2 frames
    3. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:6033)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2397)
      5. android.app.ActivityThread.access$800(ActivityThread.java:151)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1310)
      7. android.os.Handler.dispatchMessage(Handler.java:102)
      8. android.os.Looper.loop(Looper.java:135)
      9. android.app.ActivityThread.main(ActivityThread.java:5268)
      9 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
      2 frames