ReactNative生成android平台的bundle文件命令

ReactNative生成android平台的bundle文件命令

reactNative生成bundle文件

注:如果assets文件没有正确生成,需要手机创建或授权

网上的其它的很多都不好用,这个是好用的

进行React Native的根目录下执行以下命令

命令一

node node_modules/react-native/local-cli/cli.js bundle --platform android --dev true --reset-cache --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle —sourcemap-output android/app/src/main/assets/index.android.map —assets-dest android/app/src/main/res/  

命令二

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/  

 

命令一不好用,就用命令二

原文地址:https://www.cnblogs.com/honeynm/p/9007130.html