安卓应用问题

android.view.WindowManager$BadTokenException:Unabletoaddwindowandroid.view.ViewRootIm... android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@432a8300 -- permission denied for this window type
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)
展开
 我来答
大宝与莹宝
高粉答主

推荐于2019-08-24 · 每个回答都超有意思的
知道大有可为答主
回答量:184
采纳率:0%
帮助的人:6.7万
展开全部

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)

本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式