Source : React Native Generate Release APK through Windows Command Prompt Android
This tutorial explains how to generate release APK file through window command prompt in react native application. Full form of APK is Android Package Kit. The APK file is a generated package file containing all the important files which is recommended to run android app on android mobile device. By default when we create react native project app and install that app on our device – Emulator then the app install as Debug Mode. But we cannot get the Signed Release Android APK and without the original APK file we cannot upload this file on Google Play Store.
If you want to submit your app on Google Play Store or want to run your final app on other android devices or want to generate release APK or run your app without development server on all android devices then your app must be digitally signed with a certificate. There is also a problem that all the react native beginners is facing that the Un-Signed APK cannot run without the JS server. So using the Singed APK we can run our react native android app to any android mobile device without running the JS Server and upload .APK file to Google Play Store. So in this tutorial we would going to Generate signed release android APK that run without JS Server in React Native in Windows PC using Key Store and lets follow the below steps one by one :
Summary in short :
First of all, we have to generate a Signing key through command prompt.
Note: The command prompt must be run with administrator permission.
Place generated Signing key in android/app ( under your React native project ) folder.
Make required entries in android/gradle.properties file and android/app/build.gradle file.
Run this command to switch directory to android.
Command to use :
cd android
Then run the below command to generate signed version of APK file.
Command to use :
gradlew assembleRelease
Top comments (0)