React Native Android: Generating Signed APK through Android Studio doesn't include JS Bundle

烈酒焚心 提交于 2019-12-12 22:21:50

问题


Generating Signed APK through Android Studio doesn't include JS Bundle. I have been struggling install the release build on device it was not working. finally i enabled the debugging for Release build and i find out that Generated signed apk through android studio doesn't include js bundle.

How can i generate a signed apk including js bundle? to upload to play store.


回答1:


I found it on RN documentations :

Creating a release build in Android Studio You can use Android Studio to create your release builds too! It’s as easy as creating release builds of your previously-existing native Android app. There’s just one additional step, which you’ll have to do before every release build. You need to execute the following to create a React Native bundle, which’ll be included with your native Android app:

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle --assets-dest android/com/your-company-name/app-package-name/src/main/res/

Now just create a release build of your native app from within Android Studio as usual and you should be good to go!



来源:https://stackoverflow.com/questions/41057231/react-native-android-generating-signed-apk-through-android-studio-doesnt-inclu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!