无法调试React Native Android应用-窗口类型2006的权限被拒绝

时间:2018-08-09 04:17:57

标签: android react-native

我刚刚将我的targetSdkVersion更改为26。以前,我使用version 22。 当我尝试以调试模式运行该应用程序时,该应用程序始终被强制关闭。

在Android Studio上,它显示错误日志:

08-09 04:14:47.256 23321-23321/com.yummycorp.yummybox E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.yummycorp.yummybox, PID: 23321
android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@4f2395d -- permission denied for window type 2006
    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.facebook.react.devsupport.DevLoadingViewController.setVisible(DevLoadingViewController.java:150)
    at com.facebook.react.devsupport.DevLoadingViewController.access$100(DevLoadingViewController.java:39)
    at com.facebook.react.devsupport.DevLoadingViewController$1.run(DevLoadingViewController.java:71)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    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)

请有人可以帮助我吗?我的React Native版本是0.47.2 如果您需要更多信息,请询问我。

谢谢

0 个答案:

没有答案