2025-03-01 08:17:39
manifest.xml 添加权限
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
问题Main.log:
FATAL EXCEPTION: main
Process: com.android.phone, PID: 761
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@1cb8bd0 is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:562)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.Dialog.show(Dialog.java:298)
at android.preference.DialogPreference.showDialog(DialogPreference.java:316)
at com.android.settings.EditPinPreference.showDialog(EditPinPreference.java:103)
at com.android.settings.IccLockSettings.handleGetRemainTimesResponse(IccLockSettings.java:174)
at com.android.settings.IccLockSettings.access$300(IccLockSettings.java:71)
at com.android.settings.IccLockSettings$1.handleMessage(IccLockSettings.java:156)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5345)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:947)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742)
2025-03-01 02:19:41