We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
首先,需要按照官方文档的步骤对app进行签名。
cd android进入安卓工程目录 ./gradlew assembleRelease开始打包
cd android
./gradlew assembleRelease
这里可能会卡在:app:bundleReleaseJsAndAssets这个状态一直不动,这个时候直接control + c 放弃打包
首先我们在项目根目录下执行react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output App/src/main/assets/index.android.bundle --assets-dest App/src/main/res/ 注意:
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output App/src/main/assets/index.android.bundle --assets-dest App/src/main/res/
处理好上面的步骤后,我们进入安卓的工程目录下,输入./gradlew assembleRelease -x bundleReleaseJsAndAssets尝试打包。
./gradlew assembleRelease -x bundleReleaseJsAndAssets
这时我们应该发现APP已经打包成功了,但是安装在手机上后发现代码没有更新,这是因为每次打包前都需要生成一个新的index.android.bundle文件,这时我们需要进入安卓工程目录,进到/src/main/assets下删除旧的index.android.bundle文件,在重复执行react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output App/src/main/assets/index.android.bundle --assets-dest App/src/main/res/这个步骤,再尝试打包即可
/src/main/assets
The text was updated successfully, but these errors were encountered:
No branches or pull requests
签名
首先,需要按照官方文档的步骤对app进行签名。
尝试打包
cd android
进入安卓工程目录./gradlew assembleRelease
开始打包这里可能会卡在:app:bundleReleaseJsAndAssets这个状态一直不动,这个时候直接control + c 放弃打包
首先我们在项目根目录下执行
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output App/src/main/assets/index.android.bundle --assets-dest App/src/main/res/
注意:
重新打包
处理好上面的步骤后,我们进入安卓的工程目录下,输入
./gradlew assembleRelease -x bundleReleaseJsAndAssets
尝试打包。代码更新了APP没有变化?
这时我们应该发现APP已经打包成功了,但是安装在手机上后发现代码没有更新,这是因为每次打包前都需要生成一个新的index.android.bundle文件,这时我们需要进入安卓工程目录,进到
/src/main/assets
下删除旧的index.android.bundle文件,在重复执行react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output App/src/main/assets/index.android.bundle --assets-dest App/src/main/res/
这个步骤,再尝试打包即可The text was updated successfully, but these errors were encountered: