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.
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.
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:
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
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/
There are two ways to build apk, check below:
For this you have to login into phonegap site and upload your www
folder, it will create apk for you automatically
phonegap build android
OR
cordova build android