2

Does anyone know how to generate the apk?

I'm trying to build the apk of my application with Phonegap / Cordova CLI. I need some tutorials or information about it.

thanksd
  • 54,176
  • 22
  • 157
  • 150
ATellez
  • 115
  • 1
  • 11

4 Answers4

3

To check whether or not you have everything installed that is required to build an APK first run this command:

$ cordova requirements

This should give something similar to the following result:

Requirements check results for android:
Java JDK: installed .
Android SDK: installed
Android target: installed android-19,android-21,android-22,android-23,Google Inc.:Google APIs:19,Google Inc.:Google APIs (x86 System Image):19,Google Inc.:Google APIs:23
Gradle: installed

You need to make sure that you have the latest Java JDK installed and the Android SDK. You will also need to make sure that Java is in you computer's PATH.

Then you can run this command:

$ cordova build android

Follow this guide:

https://cordova.apache.org/docs/en/latest/guide/cli/

L Balsdon
  • 995
  • 8
  • 12
2

Build your android cordova project from Command line:

cordova build android

After successfully run the above command you can see the apk file in following path of your project under platform folder : 'Your project folder'\platforms\android\build\outputs\apk

Pranay Kumar
  • 144
  • 5
1

I assume that you are using Cordova CLI, run the following command from project root directory:

cordova prepare
cordova build android

follow this tutorial: https://cordova.apache.org/docs/en/latest/guide/cli/

Gaurab Kumar
  • 2,144
  • 2
  • 17
  • 29
1

There are two ways to build apk, check below:

  1. You can generate build from https://build.phonegap.com

For this you have to login into phonegap site and upload your www folder, it will create apk for you automatically

  1. From command line also you can build using following command
phonegap build android

OR

cordova build android
Mrinmoy
  • 1,370
  • 2
  • 18
  • 28