Open the terminal:-
$ cordova create hello com.example.hello HelloWorld
$ cd hello
$ cordova platform add android
$ cordova build
Build the Project :-
If you are using the CLI in development, the project directory's top-level www directory contains the source files. Run either of these within the project directory to rebuild the app:
$ cordova build
$ cordova build android # do not rebuild other platforms
$ cordova create hello com.example.hello HelloWorld
$ cd hello
$ cordova platform add android
$ cordova build
Build the Project :-
If you are using the CLI in development, the project directory's top-level www directory contains the source files. Run either of these within the project directory to rebuild the app:
$ cordova build
$ cordova build android # do not rebuild other platforms
Deploy to Emulator:-
At this point you can use the cordova CLI utility to deploy the application to the emulator from the command line:
$ cordova emulate android
Deploy to Device:-
To push an app directly to the device, make sure USB debugging is enabled on your device as described on the Android Developer Site, and use a mini USB cable to plug it into your system.
You can use this CLI command to push the app to the device:
$ cordova run android