Purpose: Build a cross-platform development Environment (Cordova) under Windows system to create an Android project
Prerequisite: Install Java JDK 1.8 or more
Android SDK 23 or more
1. Install node. js, select the appropriate version to download and install, nothing to say
Official website: http://nodejs.cn/
2. Test whether the installation was successful
Win+r key, open Run window, enter cmd, then OK, open command Line window
Input Node-v
The output version number, which indicates that node. JS installation was successful, or find the cause, or reinstall
Input Npm-v
The output version number indicates that NPM can be used, with node. JS installation, the General node. JS installation will be successful
3. Installing Cordova
Also executed at the command line
NPM install-g Cordova
Install Cordova, slow process, please wait patiently
Some networks cannot be installed successfully and will prompt for errors
You can try the command: NPM config--global set Registry http://registry.cnpmjs.org
Then execute: NPM install-g Cordova
Note: (Please ignore the direct installation pass) you need to install something else for a while, re-enter the NPM config--global set registry every time you reopen the command line window http://registry.cnpmjs.org
4. Create a cross-platform project
Go to the desired folder from the command line (do not search by yourself: cd command)
Execute in folder: Cordova create "new folder name" "Package Name" "Project name"
Example: Cordova Create Project Com.moxue.helloworld HelloWorld
In a very short time, a project is created and completed.
5. Create an Android app
Go to project folder: Execute CD Project
Execution: Cordova platform add Android
Patience is a great need.
6. Plug-in installation (a more complete blog)
Http://www.hangge.com/blog/cache/detail_1158.html
In this way, a cross-platform application is created so that it can be imported, Androidstudio or eclipse run to see
Building a cross-platform development environment under Windows System (Cordova) + Create an Android project