android studio tutorial: Quick Android App from JavaScript React

Published: 27 November 2022
on channel: HTML5 Game Tutorials
138
1

QUICK ANDROID APP
By Satya
Quick Android App

There is no need of android license key
when you want to build an app for your
own phone for personal use…



And of course, you can distribute it to
your friends and relatives



Let’s start
Quick Android App

Prerequisites

• Visual Studio Code for a quick JavaScript/React/Angular App
• Android Studio




Go for it now…
Quick Android App

I am using a simple react `todo` app
which I customized to make my grocery
shopping experience easy…




Here is the app url:
https://codesandbox.io/s/simple-react...
mo0g05


Next..
Quick Android App

Let me create a
file capacitor.config.json in the root
folder

Add below code into it:
{
"appId": "io.ionic.yourAppName",
"appName": " yourAppName ",
"bundledWebRuntime": false,
"npmClient": "npm",
"webDir": "build",
"cordova": {}
}



Next..
Quick Android App

Let me create a file ionic.config.json in
the root folder


Add below code into it:
{
"name": "yourAppName",
"integrations": {
"capacitor": {}
},
"type": "react"
}


Next..
Quick Android App

If you are using react app



Run below command in command prompt
`npm run build`


Command prompt is opened at the root of react project

Make sure the app runs locally


Next..
Quick Android App

Install CAPACITOR locally by running
below command in command prompt


Run below commands in command prompt


• `npm install @capacitor/core`
• `npm install @capacitor/cli --save-dev`
• `npx cap init`


Using the same command prompt which was opened at the root of react project




Next..
Quick Android App

Make sure android studio is installed



Run below command in command prompt
`ionic capacitor add android`


This will create the android folder in our project root

Using the same command prompt which was opened at the root of react project


Next..
Quick Android App

To open the project in android studio



Run below command in command prompt
`npx cap open android`


This will open the project in android studio IDE

Using the same command prompt which was opened at the root of react project


Next..
Quick Android App

Now we are in Android Studio



Run the project once it is initiated


Now, goto the build menu and select
`Build bundles/apks - Build apks`



Next..
Quick Android App

Now we have our APK ready to be run in
our smart phone


Locate the build folder on your system

Send the APK to your phone using whats-app web or
any other technique

Install the app and its ready to use…
Quick Android App

Don’t forget to like..
Let me know what else you are looking
for in comments…


in the description
• Attached the APK file
• Given the project link on gitlab


Thank you


https://gitlab.com/youtube64/grocery-app


On this page of the site you can watch the video online android studio tutorial: Quick Android App from JavaScript React with a duration of hours minute second in good quality, which was uploaded by the user HTML5 Game Tutorials 27 November 2022, share the link with friends and acquaintances, this video has already been watched 138 times on youtube and it was liked by 1 viewers. Enjoy your viewing!