简体   繁体   中英

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

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.

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM