react-native ios打包和Android打包

 2023-09-19 阅读 14 评论 0

摘要:1:android和iOS都需要先打离线包,否则在Android studio上打包正式版本会闪退。 react打包?Android打包命令: /*打包到根目录的bundle*///"bundle-android": "react-native bundle --entry-file index.js --bundle-output ./bundle/index.an

1:android和iOS都需要先打离线包,否则在Android studio上打包正式版本会闪退。

react打包?Android打包命令:

/*打包到根目录的bundle*/
//"bundle-android": "react-native bundle --entry-file index.js --bundle-output
./bundle/index.android.bundle --platform android --assets-dest ./bundle --dev false"
/*assets*/
//"bundle-android": "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/"

iOS打包命令:
node node_modules/react-native/local-cli/cli.js bundle --entry-file index.js  
--platform ios --dev false --bundle-output ./ios/bundle/index.jsbundle --assets-dest ./ios/bundle

可以把打包命令放在package.json文件里,这样每次打包的时候输入相关命令就行。如下
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"bundle-ios": "node node_modules/react-native/local-cli/cli.js bundle --entry-file index.js --platform ios --dev false --bundle-output ./ios/bundle/index.jsbundle --assets-dest ./ios/bundle",
"bundle-android": "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/"
},


关于使用原生的jks文件和rn生的密匙文件如何使用?
待续

Android可以直接配置好相关的

react native 谁在用、就可以直接next打包了。

iOS需要archive打包

 



转载于:https://www.cnblogs.com/dragonh/p/9407864.html

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/3/78663.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息