Reputation: 161
Can't generate signed apk that can be installed directly on device without connecting to the server.The command given in new documentation is
cd android
$ ./gradlew bundleRelease
which will generate .aab file and app-debug.apk only.
can I use the below command to generate apk in react native 0.60-RC? Can't find that command in their updated document.
$ ./gradlew assembleRelease
Upvotes: 4
Views: 3535
Reputation: 3711
.aab
is a bundle file which can replace release .apk
, anw, you can open Android Studio, build a release APK follow Build/Generate Signed Bundle(s)/ APK
and tick on APK checkbox
UPDATE
.aab
cannot install directly, but if you want to install the app on a real device without a server (node), you can using below way
Step 1:
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
Step 2:
cd android
$ ./gradlew assembleDebug
now the debug APK file includes the bundle server, so you can install it on your real device independently.
Upvotes: 2