在进行新更改后构建对 apk 文件的反应本机应用程序? [英] Build react native app to apk file after making new changes?
问题描述
我用这个
推荐答案
要进行新的更改,首先捆绑您的 js 文件,然后您可以创建一个需要开发服务器的调试 APK 或构建一个发布 APK不需要.
To make the new changes first bundle your js file, and then after that either you can create a debug APK whihc needs a development server or build a release apk which doesnt require.
- 在你的主应用目录中粘贴这个
更新:
react-native bundle --platform android --dev false --entry-fileindex.js --bundle-outputandroid/app/src/main/assets/index.android.bundle --assets-destandroid/app/src/main/res
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
2.构建调试apk,
进入android目录,然后./gradlew assembleDebug
go to android directory , and then ./gradlew assembleDebug
或发布 apk ,
进入android目录,然后./gradlew assembleRelease
go to android directory , and then ./gradlew assembleRelease
希望对您有所帮助.不要怀疑
Hope it helps .feel free for doubts
这篇关于在进行新更改后构建对 apk 文件的反应本机应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!