1

I am building a react native app [ for some reasons I am not using expo for this project ] ..

  1. So I built apk and it does created successful built one for debug and one for release.
  2. In my phone I installed that same app but not by sharing that file but by connecting my phone through usb and by performing debugging and npx react-native create-android.
  3. but my client is far and I cant connect his phone to my pc right, and after creating those two build I shared that apk-debug.apk file which is showing error in his phone that we need to run react-native start and I can't share that aab file to my client from release folder as I don't know it will work in his phone or not, because of the extension aab.

so is there any way I can share test apk file to my client which will work in his phone just like other apps. [in expo it was easy and I did before, but I have no idea in bare react native ]

Please guide me , thank you.

faijan memon
  • 183
  • 1
  • 9
  • you have to share release version that doesn't contain debugger, there should be something like apk-release.apk. The path should be something like ```android/app/build/outputs/apk/release``` – Mod3rnx Jan 05 '22 at 08:56
  • @Oleksii yes i was looking for that release apk file but inside the release ../apk/bundle/release there is app-release.aab file exist and so i am concerned is there any way to have that file or generate that file, I followed react native docs to create this build – faijan memon Jan 05 '22 at 09:54
  • did you try from android studio -> top menu -> build -> Generate signed build/apk – Abdullah Asendar Jan 05 '22 at 12:25
  • 1
    you have generated .aab file that is for play store, you need to generate a release apk if you want to share it, it can be generated via ```./gradlew assembleRelease``` from ```android``` folder, it will be generated in ```android/app/build/outputs/apk/app-release.apk```, you menitoned the wrong folder in your commend, this one contains the release bundle(.aab) – Mod3rnx Jan 05 '22 at 13:15
  • or you can use 3rd party website https://www.diawi.com/ which is kinda useful too, it supports all binaries (aab, apk, ipa) – Mod3rnx Jan 05 '22 at 13:17
  • @AbdullahAsendar no i didn't – faijan memon Jan 05 '22 at 15:29
  • @Oleksii , okay i will try this way and thank you for helping me means alot. – faijan memon Jan 05 '22 at 15:30
  • @Oleksii , it worked like charm for me thank you and thank you.! – faijan memon Jan 05 '22 at 15:47

0 Answers0