Generate APK in React Native

In this article, we're going to see how to generate Debug APK in React Native using CLI. download (1).jpg About React Native:
React Native is an open source mobile application framework created by facebook. In other words React Native is a JavaScript framework for writing real natively rendering mobile applications for iOS and Android. React components wrap existing native code and interact with native APIs via React’s declarative UI paradigm and JavaScript. This enables native app development for whole new teams of developers, and can let existing native teams work much faster.

How to Create App in React Native:

npx react-native init spanishNumber

Here, spanishNumber is name of my application. You can name your application according to your convenience.

Generate The APK In React Native:
Before generating the APK make sure your code should be error free. Once your code is error free just come into the android folder through command cd android

cd android

Once you are in android folder, the last command that creates APK is gradlew assembleRelease

gradlew assembleRelease

This command takes couple of minutes for creating APK, For APK you have to follow the path spanishNumber\android\app\build\outputs\apk\release here you find the app-release.apk once the APK is created successfully get BUILD SUCCESSFUL message in your terminal 68cbf60a-48d4-4144-ae40-e6a1f314d83c.jpg Follow the above mention path and find the app-release APK

d933a416-4505-43e9-9a61-06814d39cc03.jpg APK is succesfully created, Feel free to download it and Install the application in your device

3b8c6186-6ce4-444a-84d8-aeb1af218aaf.jpg Now there is no need of USB cable for using the App, even you can also share the APK file. 19a17533-f974-424b-9727-f748be07b903.jpg

Did you find this article valuable?

Support Learn Code Online by becoming a sponsor. Any amount is appreciated!