Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/373.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 错误:无法添加窗口android.view.ViewRootImpl$W@e46c220--拒绝对窗口类型2010的权限_Javascript_Java_Android_Android Studio_Android Studio 3.0 - Fatal编程技术网

Javascript 错误:无法添加窗口android.view.ViewRootImpl$W@e46c220--拒绝对窗口类型2010的权限

Javascript 错误:无法添加窗口android.view.ViewRootImpl$W@e46c220--拒绝对窗口类型2010的权限,javascript,java,android,android-studio,android-studio-3.0,Javascript,Java,Android,Android Studio,Android Studio 3.0,您好,当运行我的锁屏应用程序时,它会在锁屏显示后崩溃。这是显示的预期: Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@e46c220 -- permission denied for window type 2010 这里是我的完整logcat错误日志: 07-23 20:09:26.029 24670-247

您好,当运行我的锁屏应用程序时,它会在锁屏显示后崩溃。这是显示的预期:

     Caused by: android.view.WindowManager$BadTokenException: 
Unable to add window android.view.ViewRootImpl$W@e46c220 -- permission denied for window type 2010
这里是我的完整logcat错误日志:

    07-23 20:09:26.029 24670-24783/com.konkas.lockingscreenings E/BluetoothAdapter: Bluetooth binder is null
07-23 20:09:27.581 24670-24822/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:27.582 24670-24822/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:27.595 24670-24821/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:27.596 24670-24821/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:27.892 24670-24849/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:27.894 24670-24849/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:28.564 24670-24836/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:28.566 24670-24836/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:28.669 24670-24836/com.konkas.lockingscreenings E/BluetoothAdapter: Bluetooth binder is null
07-23 20:09:28.777 24670-24818/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:28.778 24670-24818/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:29.031 24670-24874/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:29.034 24670-24874/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:31.910 24670-24874/com.konkas.lockingscreenings E/chromium: [ERROR:gl_surface_egl.cc(289)] eglChooseConfig failed with error EGL_SUCCESS
07-23 20:09:32.179 24670-24909/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:32.183 24670-24909/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:32.266 24670-24670/com.konkas.lockingscreenings E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.konkas.lockingscreenings, PID: 24670
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.konkas.lockingscreenings/com.konkas.lockingscreenings.activity.LockNoPasscode}: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@e46c220 -- permission denied for window type 2010
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@e46c220 -- permission denied for window type 2010
        at android.view.ViewRootImpl.setView(ViewRootImpl.java:789)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
        at com.konkas.lockingscreenings.activity.LockNoPasscode.mWindowAddView(LockNoPasscode.java:341)
        at com.konkas.lockingscreenings.activity.LockNoPasscode.onCreate(LockNoPasscode.java:102)
        at android.app.Activity.performCreate(Activity.java:7009)
        at android.app.Activity.performCreate(Activity.java:7000)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
        at android.app.ActivityThread.-wrap11(Unknown Source:0) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:164) 
        at android.app.ActivityThread.main(ActivityThread.java:6494) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
07-23 20:09:32.555 24670-24914/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:32.556 24670-24914/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
07-23 20:09:32.582 24670-24916/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
  07-23 20:09:32.584 24670-24916/com.konkas.lockingscreenings E/StudioProfiler: JVMTI error: 
    15(JVMTI_ERROR_THREAD_NOT_ALIVE) 
我可以做些什么来解决这个错误和崩溃,我也尝试了添加

android.permission.SYSTEM_ALERT_WINDOW
但这没用,我还是不断地犯同样的错误。。
我应该做些什么来解决这些错误和崩溃,我需要编辑哪些文件,我需要在其中更改哪些代码,非常感谢您的帮助和支持

你读过这样的问题吗?但是我不知道我应该在哪里复制这个代码……我已经有了一个java代码,需要添加这个,但是我在哪里添加它,在中间开始?我如何设法做到这一点而不从Android工作室获得错误,而不是在正确的地方导入代码?Jeroenheeri试着这么做,但毫无帮助,其他人对如何解决我的问题有什么想法吗?