安卓应用问题
at android.view.ViewRootImpl.setView(ViewRootImpl.java:587)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:263)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
at android.view.WindowManagerGlobal.addView(Native Method)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.widget.Toast$TN.handleShow(Toast.java:431)
at android.widget.Toast$TN$1.run(Toast.java:339)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5135)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:798)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:614)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
at dalvik.system.NativeStart.main(Native Method) 展开
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)