All along, app development is divided into Android version and iOS version, the same app needs to write two versions, the version is different, the cost is added. Cordova's emergence is a stream of clear, it can be H5 page packaged into Android or iOS version, the implementation of Android, iOS, PC-side page unification. The content is written in H5, and the difference and cost are reduced. It supports a variety of open source plug-ins can easily achieve a number of mobile phone interface calls, no functional problems.
Operation needs to master certain Nodejs
Installation of Cordova:
Download the JDK, install the Java environment, and configure the system environment. There are tutorials on the web
Open the cmd command line, run NPM install-g Cordova, and install Cordova globally.
Test whether the Cordova is installed, continue to enter CORDOVA-V on the command line, check the Cordova version number, and if there is version information, the Cordova has been successfully installed.
New Cordova Project Cordova Create FolderName
Enter the folder for the new Cordova Project CD FolderName
New Android Project Cordova Platform add Android
New iOS Project Cordova Platform add iOS
FolderName Directory has a WWW folder, which puts its own project HTML, JS, CSS, image files. Package the code into an APK file Cordova build
Data cable Connect your phone to your computer, and your phone turns on USB debug mode. Enter the command Cordova run Android–service to install the Android package on your phone for project preview and commissioning.
Cordova features more than this, the official website has more detailed introduction, open Cordova official website. A plugin that calls phone functions or other features is included on the website. Search Cordova + keywords on GitHub can also find a lot of useful plugins. Keep on learning.
Reproduced in http://www.xiaoyuezhang.com/artical/cordova.html