Search code examples
androidioscordovaphonegap-cli

Phonegap / Cordova - Build Apk


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.


Solution

  • 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/