Hope you understand
This problems outside the AppBuilder topic are do not cover in our support. We only help fellow as programmers, We only help personally not appbuilder support
Software
- Download the NodeJS according to your os: https://nodejs.org/en/download/ and install it
- Download the Gradle: https://gradle.org/install/ and unzip it
- Download the Android Studio: https://developer.android.com/studio/ and install and update it
Windows User
Install Android Studio and Update Your Android Studio Configuration
- Install Android Studio and connect your internet
-
Run your Android Studio -» Tools -» SDK Manager -» Appearance & Bahavior -» System Setting -» Android SDK -» SDK Platform -» Update SDK Platform
Please tick Android 12.x (API Level 31), API Level 32, API Level 33, API Level 34 or latest and delete the old version
-
Then Update SDK Builds-Tools, click SDK Tools tab then checked Show Package Details
Checked SDK Build-Tools 33.0.2 or latest version (according your SDK Build-Tools version)
- Click File -» Choose Your Project -» Add No Activity
- Click File -» Setting -» Build, Execution, Deployment -» Build Tools -» Gradle, Set Default Gradle Wrapper or Use Local Gradle distribution and then click OK
- Then Click Build -» Build Bundle(s) / APK(s)
Setting Environment variables
-
For Window user, go to Control Panel -» System -» Advanced System Setting -» Tab Advance -» Environment Variables Button, and edit environ for
PATH
according SDK Build-Tools pathchange according to the name of the folder/path of your computer, example:
c:\build-apk\androidsdk c:\build-apk\androidsdk\tools c:\build-apk\androidsdk\tools\bin c:\build-apk\androidsdk\platform-tools C:\build-apk\androidsdk\build-tools\33.0.0\ c:\build-apk\androidsdk\cmdline-tools\latest\bin
And you also need keytool and jarsigner which are in jre (current version: jbr), also add it to PATH
change according to the name of the folder/path of your computer
If you need gradle commands, you should also add gradle to PATH
change according to the name of the folder/path of your computer
-
also check the SystemRoot environments, it should also be in the PATH
-
Then click New add new environ for
ANDROID_HOME
andANDROID_SDK_ROOT
and write the variable value according Android SDK pathchange according to the name of the folder/path of your computer
-
And click New add new environ for
JAVA_HOME
and write the variable value according Java SDK pathchange according to the name of the folder/path of your computer
Install Ionic-CLI
Connect your internet, then run
Node.js command prompt
or usingterminal/bash
Install Ionic CLI globally with npm, type this command:
npm install -g @ionic/cli
and also install cordova:
npm install -g cordova@latest
Test Tools
Make sure nothing comes out: xxxx is not recognized as an internal or external command
when running the command below:
- Run
Node.js command prompt
orTerminal
, then run this command: Testing gradle
gradle --v
Testing keytool
keytool
Testing jarsigner
jarsigner
Test create an APK File using Ionic-CLI
Please run the following command to create an blank apk file
-
Go to
d:\
for windows usersD:
-
Create an ionic project
ionic start "Test App" blank --project-id="test-app" --type=angular --cordova
-
[WARN] About to integrate your app with Cordova.
Y
-
Connect with millions of developers on the Ionic Forum and get access to live events, news updates, and more.
N
-
Go to the folder you just created
cd test-app
-
Add
ionic-native
corenpm install @awesome-cordova-plugins/core@latest --save
-
Add
android
platformionic cordova platform add android@latest
-
And try to create an apk file
ionic cordova build android
Last edit: 2023-07-29 10:58:00