Simple android app built with Cordova, PhoneGap and Android Studio (Manual Process)
Prerequisite:
- Android Studio(Jellyfish | 2023.3.1)(zip)
- Gradle-8.8(complete-zip)
- JDK-17 (installer)
- NodeJs-20.15.1
Procedure:
- Unzip Android Studio. (D:/Android-Studio/android-studio)
- Unzip Gradle (D:/Android-Studio/gradle-8.8
- SDK location (D:/Android-Studio/SDK)
Set Environment Path(If path not added):
System variable:
- Name(ANDROID_HOME), Value(D:\Android-Studio\SDK)
- Name(ANDROID_SDK_ROOT), Value(D:\Android-Studio\SDK)
- Name(GRADLE_HOME), Value(D:\Android-Studio\gradle-8.8)
- Name(JAVA_HOME), Value(C:\Program Files\Java\jdk-17)
- Path (D:\Android-Studio\SDK\platform-tools)
- Path (D:\Android-Studio\gradle-8.8\bin)
- Path (%JAVA_HOME%\bin)
Install Node.JS, then Cordova:
npm install -g cordova
PhoneGap Procedure(CMD):
Step 1: Create a new Cordova App
cordova create MyInfo info.androidabcd.myinfo MyInfo
cd MyInfo
Step 2: Add the Android platform
cordova platform add android@latest
Step 3: Prepare the Cordova project
cordova prepare
Step 4: Build Cordova Project
cordova build android
Build Successful--APK built (In CMD)
Build/Import With Android Studio Procesure:
- Select Project MyInfo > platform > android
- Auto build start & finish successfully. If not, File>Sync project with gradle.
- If build problem, then set bellow settings.
Android Studio:
Show snapshot from Data.Source folder
File> Settings> Build & Execution> Build Tools> Gradle
Distribution> Wrapper(auto selected), Gradle JDK> or select any JDK-17, Select 2nd box> jbr/JDK-17
If gradle wrapper not find, then select Local Installation > Select any JDK-17
File> Project Structure> gradle 8.4 auto selected or not. (optional).
Tools> SDK Manager> Set SDK location.
API Level-35 checked.
Show attached snapshot of SDK tools download in Data.Source folder.
Project should be build after that.
Cordova config file:
Cordova app manifesto file (like config.xml in Android Studio)
location: node_modules\cordova_android\framework\cdv-gradle-config-defaults.json
If build have problem with SDK image not found, then see SDK version from manifesto & download in SDK manager.
Check snapshot.
APK build file location:
MyInfo\platforms\android\app\build\outputs\apk\debug
To use this repository:
Unzip node_modules.zip and platforms.zip file
Done.