I. Install JDK (configure environment variables)
2. Install the android SDK (configure the environment variable path F: \ Android-SDK-Windows \ platform-tools; F: \ Android-SDK-Windows \ tools)
3. install Apache ant (configure the environment variable path D: \ apache-ant-1.9.4 \ bin ;)
4. Install nodejs
5. Install git
6. If the process is successful, enter the following password in cmd (Administrator:
Java
Javac
Java-version
Ant-version
ADB version
Emulator-version
7. Install phonegap
CMD input:
NPM install-G phonegap
Successful or not:
Phonegap-version or phonegap
8. Install CORDOVA
CMD input:
NPM install-G CORDOVA
Successful or not:
Cordova-version or CORDOVA
IX:
Use phonegap to create a project
Phonegap create appname
CD appname
Phonegap build android
Import the project to eclipse and run:
Use Cordova to create a project
Cordova create appname
CD appname
Cordova platform add android
Cordova build
Import the project to eclipse and run:
Apache Cordova is an open-source project contributed by phonegap to Apache. It is the core code extracted from phonegap and is the core engine driving phonegap.
Phonegap is the original name, Cordova is the project name used after phonegap is donated to Apache, and phonegap name is also reserved.
10: After the android project generated by the phonegap/Cordova command is imported to eclipse
Import the project-> build all
11:
Install the phonegap plug-in (generated using the Cordova command)
For example, to install dialogs
First, go to the folder where the project is located.
cordova plugin add org.apache.cordova.dialogs
You can.
Remember to add
<SCRIPT type = "text/JavaScript" charset = "UTF-8" src = "Cordova. js"> </SCRIPT>
Configure and install plug-ins in the phonegap Environment