Reputation: 457
I build a react native app with this documentation , its working fine then , But when i am implementing new changes to apk , its not installing properly on my android Mobile device and gives error on first open ,
please help .
Upvotes: 1
Views: 3355
Reputation: 65
I was also facing the same issues and I had tried
cd android && ./gradlew clean && ./gradlew assembleDebug
and It was not working for me
then I tried running at root
yarn createDebug
and checked apk at
root/android/app/build/outputs/apk/debug/app-debug.apk
It worked for me
Upvotes: -1
Reputation: 12195
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.
updated:
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.to build debug apk ,
go to android directory , and then ./gradlew assembleDebug
or for release apk ,
go to android directory , and then ./gradlew assembleRelease
Hope it helps .feel free for doubts
Upvotes: 4