Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react native build release from .apk to .aab, how to send the app to the clients?

It's been so long since I develop a mobile app in react native, when I'm developing before, I usually generate a release apk and send it to my clients so that they can test it and have experienced it, but now when I build a release in react native, it returns a .aab instead of .apk, how can I send my application to the clients when I only get .aab format on my project?

like image 684
Dylan Avatar asked Oct 19 '19 14:10

Dylan


People also ask

How do you get AAB in react native?

The generated AAB can be found under android/app/build/outputs/bundle/release/app-release. aab , and is ready to be uploaded to Google Play. In order for Google Play to accept AAB format the App Signing by Google Play needs to be configured for your application on the Google Play Console.


3 Answers

It using for different android devices installation by google play store. that's why you can use apk build for manual installation.

You must use the below command for the testing build.

$ cd android
$ ./gradlew assembleRelease
like image 198
Anılhan Hasceviz Avatar answered Oct 19 '22 19:10

Anılhan Hasceviz


As mentioned repeatedly in many places .aab file is efficient. But we need .apk for regular task (except PlayStore).

So:-

  1. Create signed output of Android project Link
  2. Use command $ npx react-native run-android for debugging.
  3. Finally $ npx react-native run-android --variant=release Link, to create release version, which is created at android/app/build/outputs/bundle/release/app.apk
  4. Go crazy
like image 37
Shanu ji Avatar answered Oct 19 '22 20:10

Shanu ji


Just for the information. If you upload the AAB to Google Play instead of the APK, it will lead to smaller download sizes. AAB lets Google Play create different APKs to different devices, based on the device screen density, language, and CPU architecture. So, if you're able to create AAB's, use them over APK's.

like image 4
Roc Boronat Avatar answered Oct 19 '22 21:10

Roc Boronat