我对Oreo的所有版本都有疑问。当应用启动时,它会请求覆盖权限,然后我给它,然后每次打开该应用时,它立即崩溃。它适用于iOS和Android的早期版本。
更新的错误:
09-06 19:09:37.934 26719-26719/ E/AndroidRuntime: FATAL EXCEPTION: main
PID: 26719
android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@6ac567e -- permission denied for window type 2003
at android.view.ViewRootImpl.setView(ViewRootImpl.java:789)
旧错误:
09-06 14:20:14.200 4694-7991/com.google.android.gms E/MS_RegisterService: Exception during register request.
bods: PERMISSION_DENIED: The caller does not have permission
at bodo.c(:com.google.android.gms@12874026@12.8.74 (040700-204998136):3)
at pge.a(:com.google.android.gms@12874026@12.8.74 (040700-204998136):93)
at com.google.android.libraries.matchstick.net.SilentRegisterIntentOperation.a(:com.google.android.gms@12874026@12.8.74 (040700-204998136):299)
at com.google.android.libraries.matchstick.net.SilentRegisterIntentOperation.onHandleIntent(:com.google.android.gms@12874026@12.8.74 (040700-204998136):367)
at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms@12874026@12.8.74 (040700-204998136):2)
at dfm.a(:com.google.android.gms@12874026@12.8.74 (040700-204998136):8)
at npz.a(:com.google.android.gms@12874026@12.8.74 (040700-204998136):9)
at dfr.run(:com.google.android.gms@12874026@12.8.74 (040700-204998136):10)
at dfo.run(:com.google.android.gms@12874026@12.8.74 (040700-204998136):9)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
还有我的build.gradle文件:
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
compile project(':react-native-maps')
compile fileTree(dir: "libs", include: ["*.jar"])
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
compile "com.facebook.react:react-native:+" // From node_modules
答案 0 :(得分:1)
幸运的是,我发现它是为发行版本而构建的。它不适用于Oreo版本的调试模式。因此,也许问题出在Overlay的权限上,但是使用Oreo版本的android无法以某种方式检测到是否已授予该权限。但是,因为它可以在iOS和所有其他Android版本上运行,并且我有机会对其进行测试,调试等。我现在可以继续提交过程,因为它也可以在Oreo版本上运行,但使用
构建 react-native run-android --variant=release