Table of Contents

How to install Ionic for the Android platform?

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

  1. Download the NodeJS according to your os: https://nodejs.org/en/download/ and install it
  2. Download the Gradle: https://gradle.org/install/ and unzip it
  3. 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

  1. Install Android Studio and connect your internet
  2. Run your Android Studio -» Tools -» SDK Manager -» Appearance & Bahavior -» System Setting -» Android SDK -» SDK Platform -» Update SDK Platform

    Please tick Android 11.x (API Level 30), Android 12.x (API Level 31), API Level 32, API Level 33 or latest and delete the old version

  3. Then Update SDK Builds-Tools

    Checked SDK Build-Tools 33.0.0 or latest version (according your SDK Build-Tools version)

  4. Click File -» Choose Your Project -» Add No Activity
  5. Click File -» Setting -» Build, Execution, Deployment -» Build Tools -» Gradle, Set Default Gradle Wrapper or Use Local Gradle distribution and then click OK
  6. Then Click Build -» Build Bundle(s) / APK(s)
Make sure your Android Studio is correct and can create APK File

Setting Environment variables

  1. 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 path

    change 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
  2. 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

  3. If you need gradle commands, you should also add gradle to PATH

    change according to the name of the folder/path of your computer

  4. also check the SystemRoot environments, it should also be in the PATH

  5. Then click New add new environ for ANDROID_HOME and ANDROID_SDK_ROOT and write the variable value according Android SDK path

    change according to the name of the folder/path of your computer

  6. And click New add new environ for JAVA_HOME and write the variable value according Java SDK path

    change according to the name of the folder/path of your computer

Install Ionic-CLI

  1. Connect your internet, then run Node.js command prompt or using terminal/bash

  2. 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:

  1. Run Node.js command prompt or Terminal, then run this command:
  2. Testing gradle

    gradle --v
  3. Testing keytool

    keytool
  4. Testing jarsigner

    jarsigner

Test create an APK File using Ionic-CLI

Please run the following command to create an blank apk file

  1. Go to d:\ for windows users
    D:
  2. Create an ionic project
    ionic start "Test App" blank --project-id="test-app" --type=angular --cordova
  3. [WARN] About to integrate your app with Cordova.
    Y
  4. Connect with millions of developers on the Ionic Forum and get access to live events, news updates, and more.
    N
  5. Go to the folder you just created
    cd test-app
  6. Add ionic-native core
    npm install @awesome-cordova-plugins/core@latest --save
  7. Add android platform
    ionic cordova platform add android@latest
  8. And try to create an apk file
    ionic cordova build android
Don't use the imabuilder until you have successfully created the apk

Last edit: 2023-01-18 12:11:28

Comment

For any question about products, please contact email support is: info@ihsana.com and info@ihsana.net

Search

img