Skip to content

Simple android app built with Cordova, PhoneGap and Android Studio

Notifications You must be signed in to change notification settings

ronycse778/cordova-phonegap-android-studio

Repository files navigation

cordova-phonegap-android-studio

Simple android app built with Cordova, PhoneGap and Android Studio (Manual Process)

Prerequisite:

  1. Android Studio(Jellyfish | 2023.3.1)(zip)
  2. Gradle-8.8(complete-zip)
  3. JDK-17 (installer)
  4. NodeJs-20.15.1

Procedure:

  1. Unzip Android Studio. (D:/Android-Studio/android-studio)
  2. Unzip Gradle (D:/Android-Studio/gradle-8.8
  3. SDK location (D:/Android-Studio/SDK)

Set Environment Path(If path not added):
System variable:

  1. Name(ANDROID_HOME), Value(D:\Android-Studio\SDK)
  2. Name(ANDROID_SDK_ROOT), Value(D:\Android-Studio\SDK)
  3. Name(GRADLE_HOME), Value(D:\Android-Studio\gradle-8.8)
  4. Name(JAVA_HOME), Value(C:\Program Files\Java\jdk-17)

  5. Path (D:\Android-Studio\SDK\platform-tools)
  6. Path (D:\Android-Studio\gradle-8.8\bin)
  7. 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:

  1. Select Project MyInfo > platform > android
  2. Auto build start & finish successfully. If not, File>Sync project with gradle.
  3. 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.

About

Simple android app built with Cordova, PhoneGap and Android Studio

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published