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/  

 

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM