java.lang.IllegalArgumentException: Unknown operation string: android:system_alert_window

Stack Overflow | Mr X | 10 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.

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Unknown operation string: android:system_alert_window

    at android.app.AppOpsManager.strOpToOp()
  2. Android Platform
    AppOpsManager.checkOp
    1. android.app.AppOpsManager.strOpToOp(AppOpsManager.java:1624)
    2. android.app.AppOpsManager.checkOp(AppOpsManager.java:1646)
    2 frames
  3. com.windowmanager.demo
    WindowManagerActivity.onCreate
    1. com.windowmanager.demo.util.MIUIUtils.isFloatWindowOpAllowed(MIUIUtils.java:73)
    2. com.windowmanager.demo.compat.WindowManagerPermissionCompat$MIUIRomCompatImpl.hasFloatWindowPermission(WindowManagerPermissionCompat.java:163)
    3. com.windowmanager.demo.compat.WindowManagerPermissionCompat.hasFloatWindowPermission(WindowManagerPermissionCompat.java:198)
    4. com.windowmanager.demo.addons.settings.WindowManagerActivity.onCreate(WindowManagerActivity.java:92)
    4 frames
  4. Android Platform
    ActivityThread.main
    1. android.app.Activity.performCreate(Activity.java:6041)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2285)
    4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2394)
    5. android.app.ActivityThread.access$800(ActivityThread.java:154)
    6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
    7. android.os.Handler.dispatchMessage(Handler.java:102)
    8. android.os.Looper.loop(Looper.java:135)
    9. android.app.ActivityThread.main(ActivityThread.java:5276)
    9 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
    2 frames