Cordova Full Course- The Complete Step by Step Guide to creaste your first Android app & Deploy in Google Play. You will learn How to Publish App (HTML/CSS/JS) code to Google Play Store - Cordova. Publish REACT / ANGULAR / VUE JS App to Google play. Learn How to convert web app to android app without any code change and publish it in few steps.
-
-
Save rupeshtiwari/a4b78077a6bfb6db88bcb09c469372db to your computer and use it in GitHub Desktop.
.vscode/settings.json |
Before starting lets make sure you have installed and confirmed below softwares.
- Install Node.js ( get the download file from http://nodejs.org)
- Confirm Node.js is installed by running
node --version
- Install Git ( get the download file from http://git-scm.com. )
-
Install Cordova Npm Package Run the script to install Cordova in your windows machine
npm i -g cordova
👉Note: Make sure you open cmd / powershell on administrator mode
- Download the JDK 8 EXE and install it on your local machine. In order for installing go to Download Java Development Kit JDK 8.0 from here!
-
Add User/System Windows Env Variables
-
Create JAVA_HOME User/System Variable in Windows Env Variable with Value being the installed location of the JDK for me it is
C:\Program Files\Java\jdk1.8.0_211
Please use your own folder path while updating environment variables.
Step 1. Download Android Studio Go to Android Studio Download Page and download android studio exe file. https://developer.android.com/studio/index.html
Install android studio Now!
Step 2. Update Window Environment Variables by adding sdk tools & platform-tools folder path that is below 2 Entries in User Variables
C:\Users\rtiwari\AppData\Local\Android\Sdk\tools
C:\Users\rtiwari\AppData\Local\Android\Sdk\platform-tools
Step 3. Create ANDROID_SDK_ROOT a new User & System Windows Env Variable Variables pointing to ANDROID SDK folder: C:\Users\rupesh\AppData\Local\Android\Sdk
👉Note: You may need to restart your machine after changing user environment variables.
As of Cordova-Android 6.4.0, Gradle is now required to be installed to build Android.
Step 1. Download the latest Gradle distribution
Step 2. Copy Gradle Bin to c:\Gradle
Create a new directory C:\Gradle with File Explorer and copy gradle-5.4.1
folder into it.
Step 3. Configure your system environment for Gradle.
In File Explorer right-click on the This PC (or Computer) icon, then click Properties -> Advanced System Settings -> Environmental Variables
.
Under System Variables select Path, then click Edit. Add an entry for C:\Gradle\gradle-5.4.1\bin
. Click OK to save.
👉Note: Before Confirming your paths and installations please restart your machine ignore if you already restarted after adding windows environment variables.
Run below script in admin powershell to check JAVA_HOME path.
$ENV:JAVA_HOME
Run below script in admin powershell to check ANDROID_SDK_ROOT path.
$ENV:ANDROID_SDK_ROOT
-
Run below script to check JDK Installed:
- Run Below SCRIPT on Admin Command Prompt/Powershell
javac -version
adb version
You should see this output:
Android Debug Bridge version 1.0.41 Version 28.0.3-5475833
In order to publish your android app you need to first create an cordova project.
Cordova app naming convention is as described below: Cordova App Naming convention
<appname com.domain.project appname>
Example :product-mart com.rupeshtiwari.productmart product-mart
Go to desired folder location where you want to create project. Open powershell/cmd in admin mode.
🏃🏻Run below script to create project
cordova create product-mart com.rupeshtiwari.productmart product-mart
Open project in Visual Studio Code
🏃🏻Run npm i
to install dependencies.
🏃🏻Run below script to create android platform
cordova platform add android
👮🏻 Check Android folder is created under platform folder
🏃🏻Run below script to create Browser platform
cordova platform add browser
👮🏻 Check Browsers folder created under platform folder
Is there a second part to this? It stops after adding the browser platform.