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?
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
./
. It should be gradlew assembleRelease
only. –
Execrate ./gradlew bundleRelease
(reactnative.dev/docs/signed-apk-android). Why and how is it different from ./gradlew assembleRelease
? I noticed 1 thing when trying to create universal apk files: only assembleRelease
allowed me to generate .apk file(s) directly, whereas bundleRelease
didn't create anything in /android/app/build/outputs/apk/release –
Cerise As mentioned repeatedly in many places .aab file is efficient. But we need .apk for regular task (except PlayStore).
So:-
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.
cd android
./gradlew bundleRelease
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
if you want to generate APK file instead of aab file using for Manual Testing then follow below steps.
1. cd android
2. ./gradlew clean
3. ./gradlew assembleRelease
Thanks.
in the newer version
first, go to the Android folder and run the below command
./gradlew clean
this will clean the project by removing the build directory and all the files generated during previous builds
Now run the below command to generate a production-level aab file
npx react-native build-android --mode=release
this will create an aab
file in android/app/build/outputs/bundle/release/app-release.aab
Note:- if the build fails try to delete drawable-* files in android/app/src/main/res/
folder
If you're using React Native for app development, you can send a .apk and .aab file to the client.
To generate an apk file, follow the given steps:
- Move to the Android folder as
cd android
- Then run the following command to make the apk file:
./gradlew assembleRelease
After the execution of the above command, the APK file can be located at: your_project\android\app\build\outputs\apk\release
If you want to send the .aab file, follow the documentation from React Native, as it is a multiple-step procedure. Visit the docs here:
© 2022 - 2025 — McMap. All rights reserved.