方法一:(命令行)
cd 到android文件夹
执行./gradlew assembleRelease
打包成功!apk文件存放位置:
android -> app -> build -> outputs -> apk -> release -> ***.apk

安卓生成一个.keystore的密钥库文件的步骤:
(详见RN中文网)https://reactnative.cn/docs/signed-apk-android/
方法二:(如图操作)


然后执行这句打包命令
React-native bundle --entry-file index.js --bundle-output ./android/app/src/main/assets/index.android.bundle --platform android --assets-dest ./android/app/src/main/res/ --dev false






网友评论