指定版本,react-native是facebook用mac系统开发的,windows系统兼容较差,新版本更是问题很多,

相对老版本更加稳定

react-native init demo --version 0.55.4

assets缺失:

android/app/src/main下新建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项目

 

相关文章:

  • 2021-11-19
  • 2022-01-08
  • 2022-12-23
  • 2022-01-17
  • 2021-12-05
  • 2021-10-13
  • 2021-09-12
  • 2022-12-23
猜你喜欢
  • 2021-09-27
  • 2022-01-19
  • 2021-07-17
  • 2022-12-23
相关资源
相似解决方案