New to Cordova, cordova
Apache cordova has many explanations on Baidu. I will not go into details here.
The recommended Installation Method on the official website is through npm of nodejs,
$ Sudo npm install-g cordova
C: \> npm install-g cordova
After installing cordova, you can go to a directory and use the cordova command, for example, to create a cordova project:
Cordova create hello com. example. hello HelloWorld
Directory structure of the created cordova Project
The www directory contains HTML 5 related files to be edited.
After editing html5 applications or games, we can compile them into various platforms. Before installing the plug-in, you must install the plug-in on the platform. The plug-in is only for a certain project. Therefore, you need to enter your hello directory and then execute the command to install the plug-in:
$ Cordova platform add android
Before executing a command, you must have the android sdk, JDK 1.7, or later. The android sdk can be downloaded at pai.android.com. If you have no download speed, try thunder.
After installation, It is compiled and packaged.
$ Cordova emulate android
The apk package directory is $ project \ platforms \ android \ build \ outputs \ apk.
Modify html5 content and try it out!