I. Installing the node. JS Basic Environment
Official website: https://nodejs.org/
After successful installation, you can use simple commands to view its version
Node-v
NPM Related commands
Node Cli.js install NPM-GF // installs the latest npmnode cli.js install [email protected]1.0. // can install the specified version of NPM
Installing ant:http://ant.apache.org/
Installing git:http://git-scm.com/
Download Android SDK and development tools, now with Android Studio tools more convenient
Share an Android sdk:http://pan.baidu.com/s/1i3vjl8t
Two. Installing Cordova
Install the latest version of Cordova
NPM install-g Cordova
Install the specified version of Cordova
NPM install-g [email protected]4.0. 0
See Cordova's basic information
Update Cordova version
NPM Update Cordova-g
For more commands, please check our website.
Three. Create a solution
Specify a working directory, and then the cmd command line will always enter this directory, such as M:\Android\PhoneGap0602
CD M:\Android\PhoneGap0602
Create a solution that uses the following command, after the creation is successful
Cordova Create Bertphone Com.yourname.myapp Bertphone
Enter the engineering catalogue
CD Bertphone
Add support for the platform
Cordova Platforms Add Android
Add support for Plugins
Three. Eclipse Import Project Catalog
Use Eclipse to import Android projects, select the Platforms folder under directory
After successful import, Berthapp is the mobile phone can run the package, Cordovaapp-cordovalib is Cordova Core package source code
four. Cordova Introduction
Mobile development is now more hot, more popular with Android and IOS, and mobile development is divided into three kinds:
1. Original Eco-development: That is, using Android (Java) to develop, based on the Java language
2. WEBAPP: Using HTML5 + JS, based on mobile browser
3. Hybrid development: Basic and WebApp development is similar, also based on mobile browser, but can be packaged as app files
The hybrid development will be used to Cordova,cordova formerly known as PhoneGap, PhoneGap donated Apache after the change of its core renamed to Cordova, this article uses the Cordova4.0 version as the benchmark
As the version changes, the Cordova version of the difference will be different, when debugging the development of code is very inconvenient
CORDOVA4.0 Series--Basic Environment Construction (1)