在签名的APK版本上反应原生空白屏幕

时间:2017-03-26 14:01:51

标签: android react-native

我正在使用Android 6.0和react-native 0.39.2。我在开发过程中没有遇到任何问题,但是当我按照官方文档(https://facebook.github.io/react-native/docs/signed-apk-android.html)构建并运行签名的.apk时,模拟器和我的设备上只显示一个空白屏幕。我还检查并应用了同一问题的解决方案:React native blank screen after generating APK。运行以下命令:

$ mkdir -p android/app/src/main/assets
$ react-native bundle --platform android --dev false --entry-file 
index.android.js \
  --bundle-output android/app/src/main/assets/index.android.bundle \
  --assets-dest android/app/src/main/res/

curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"

构建之前

$ cd android && ./gradlew assembleRelease

没有解决问题。我还检查了设备日志,似乎没有错误:

03-26 16:35:44.950 11586 11613 I ReactNativeJS: Running application 
"lycapp" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === 
false, development-level warning are OFF, performance optimizations 
are ON

有没有人有类似的问题?

0 个答案:

没有答案
相关问题