React Native打包后运行崩溃记录

把react native集成到现有android项目中打包后崩溃,debug是没有问题的,于是写个demo,这里记录一下错误,先上图。
React Native打包后运行崩溃记录
如果使用的是android studio 打包,需要先生成index.android.bundle,index.android.bundle.meta,这两个文件是打包后的js文件用于加载js页面到activity上,位于app\src\main\assets目录下,没有就创建assets

生成命令如下

react-native bundle –platform android –dev false –entry-file index.js –bundle-output android/app/src/main/assets/index.android.bundle –assets-dest android/app/src/main/res/
之后使用android studio正常签名打包就可以了

相关文章:

  • 2022-01-29
  • 2021-06-14
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2021-06-10
  • 2021-08-21
猜你喜欢
  • 2022-12-23
  • 2021-07-26
  • 2021-11-01
  • 2021-09-08
  • 2022-01-02
  • 2021-11-15
  • 2021-04-10
相关资源
相似解决方案