Skip to content Skip to sidebar Skip to footer

How To Generate Dev Apk File Without Asking For Dev Settings Server Ip In React Native

I am able to generate APK(not signed APK) file using android studio. if i install that apk then we need to enter Dev server ip address in dev settings then only app working. Now ho

Solution 1:

For debug apk you need to manually create the bundle for a debug build and generate apk using gradlew.

react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
cd android
./gradlew assembleDebug

Generated apk will be located at android/app/build/outputs/apk

This apk run in debug mode. If you shake device and try dev setting menu for reload, It required server IP. but you can dismiss message. Your app will work properly.

You can also generate apk for release mode. It not required any IP and not show any dev setting.

To generate apk in release mode

cd android
./gradlew assembleRelease

Post a Comment for "How To Generate Dev Apk File Without Asking For Dev Settings Server Ip In React Native"