Build Android APK easily with Cordova CLI

  • 7 favourites



7,194 visits, 16,037 views



This tutorial hasn't been translated.


This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Part 2: building an android debug APK

are you still there ^^?

great then you are practically ready to build your first apk!!

Open your C2 project wich you want export to android, remember to fill project fields like ID com.mycompany.myapp etc

then click "Export Project" from "File" Menu, select "Cordova" on the Mobile section, then click next, customize parameters as you wish

then set next window like this. then finalize exporting your project and close C2.

NB setting "any" as "minimum Android" field, install the Crosswalk, i hot suggest to include this framework that on android devices is it is much more powerful even if your apk will occupy 30MB in excess of those not crosswalked, anyway, if you don't want to use Crosswalk but you choose for android system webview (from 5.0) just ignore all -armv7 characters on the codelines mentioned on this tutorial and here choose 5.0+lollipop [webview] instead of "any"

well, now go into your exported project folder, open it and select all content, and right click to copy it..

open one more time command prompt by pressing WIN button and tiping cmd then pressing enter, on CMD window open type this

cordova create yourprojectname then press enter

this make a directory named as you project name, with some generic "empty" content, browse your user folder from desktop, and into yourprojectname (just maded) directory open and right click to paste and overwrite files (the path is correct if you can see the www folder inside)

now back at the command prompt window, go into yourprojectname folder by typing cd yourprojectname then type cordova platform add android then press enter and wait that cordova install crosswalk plugin into your project etc..

NB for the first time you do this, you need to be connected at internet and wait a little more time, because Cordova download, config and install some files, next times is most quickly the process

and now the final command, type cordova build android to build your debug apk, when it's done, in your project subdir you have two apk files (building with crosswalk cause this, due to armv7 or x86 mobile device architecture, if you don't use crosswalk, here you encounter only one multiple/combined apk that work on both architectures indistinctly)

just send that one you need at your mobile device (ensure to enable permission for install third party apps from your device settings option)


  • Order by
Want to leave a comment? Login or Register an account!