Reputation: 129
I generated signed apk for react native application ,now i want to give distribute .How can others install it on their device.it gives error java.lang.RuntimeException: ReferenceError: Can't find variable: __fbBatchedBridge (:1) Because react-native server is not started.How can a third person install my applicaion.
What all settings do i need to do so that they simply install my application by installing the apk.
Upvotes: 0
Views: 1225
Reputation: 19049
1) First create the bundle:
react-native bundle --platform android --dev false --entry-file index.android.js \
--bundle-output android/app/src/main/assets/index.android.bundle \
--assets-dest android/app/src/main/res/
2) Then assemble the release to install to:
cd android && ./gradlew assembleRelease && cd -
3) Then check that device is the only connected device with:
adb devices
4) And finally install the release:
cd android && ./gradlew installRelease && cd -
Step #2 is not mandatory, but it's generally good to create the release APK.
Upvotes: 2