Windows7 installation configuration phonegap3.0 (cordavo) development environment tutorial

  
company is using windows7, so have to do a configuration under windows again, by the way also wrote down
the main trouble is to add several in win7 Environmental variables, this place must be carefully added, the steps are quite a lot, give you a town tonic, see the final successful operation first, I also tested the integration of an ad network SDK, as shown:

Start it...
Note: If I give the official download address below, please download it yourself, because my win7 is 64-bit, it may be a bit different from yours. You have to download the correct installation package
1, download nodeJS, and install
step by step to install
2, download android sdk
After downloading, unzip and place it in a folder, for example The folder I placed is:
E:frameworksadt-bundle-windows-x86_64-20131030
It should look like this:

At this point you have only an android sdk manager, true Android sdk still needs further downloads
Double-click SDK Manager.exe will open sdk manager, download the android SDK package you need, as shown in the figure:

Add android sdk to the computer global environment variable
On the computer, right-click and select Properties to open -> System Panel -> Advanced System Settings -> Environment Variables -> System Variables, click the New button, it should be like this

New
Variable name: Android_Home
Variable value: E:frameworksadt-bundle-windows-x86_64-20131030sdk
The value of the variable is the path you just placed android sdk folder
then find the Path variable in the system variable, If not, you build a
double-click this variable to add in the variable value. :
;%Android_Home%tools
Don't forget that there is a ”;”semicolon....
New
Variable Name: Android_adb
Variable Value: E:frameworksadt- Bundle-windows-x86_64-20131030sdkplatform-tools
Also added in the Path variable:
;%Android_adb%
3, download JAVA jdk
Recommended to download jdk1.6 version installation, too high eclipse May not run ah pro..
Also add java to the global environment variable
New
Variable name: JAVA_HOME
Variable value:
D:Program FilesJavajdk1.6.0_39
The path of the JDK on my computer, you have to change the folder path of your own JDK folder on your computer
New
Variable Name: CLASSPATH
Variable Value:
.;%JAVA_HOME%lib;%JAVA_HOME % libtools.jar
Don't forget the first "." number
also added in the Path variable:
;%JAVA_HOME%bin;%JAVA_HOME%jre bin
4, Download Ant
Ant is a project of apache
Don't ask why you want to install this, anyway, if you don't install it, you will get an error when adding android platform to phonegap
Add ant to global environment variable
New
Variable name: AN T_HOME
Variable value: D: apache-ant-1.9.3
Path variable added:
;%ANT_HOME%bin
Ok, the added system variables are basically fixed, big project, Big trouble, don't get it wrong. I want to check which item has been added successfully in the system variable. Just enter the name of the item in the cmd command line tool and press Enter to see if there is any response. For example, if you enter node -v to display the version number, the installation is successful.
5, the next is to install eclipse
In fact, eclipse is not installed, but it is strongly recommended to install, use the command line to deal with, too much trouble is not?
When you just downloaded the android SDK, There should be an eclipse in the folder. If not, go to the official download one.
6, download the ADT package for eclipse use
after downloading, open eclipse and select help->Install New Software
Open the Install panel, click the add... button, then click the archive... button to find the zip package you just downloaded, and then confirm the installation and restart eclipse.

7, install phonegap3.x(cordova)
Phonegap was renamed to cordova after being acquired by Adobe, so the following is called cordova.
Enter
npm install -g cordova
Nodejs in cmd command line tool to help you install Good cordova
8, build Cordova project
Open the cmd command line tool, locate the directory where you need to create the project and enter
cordova create hello com.example.hello "helloworld"
means suggesting a hello folder and in the file The recommended cordova project in the folder is called "helloworld";
com.example.hello can be said to be the id of your project, don't worry about it now
Enter the hello folder
cd hello
Add the android platform project
cordova platform add android
Well, there are already android projects under the platforms folder under hello folder
9, open android project with eclipse
open eclipse
select import under file menu Open the import panel

Select android->Existing android code into workspace Then click next
Open the Import Project panel, click the Browse... button, and find the android file under the helloplatforms folder just created
Click on finish to import the project,
Figure:

Select Helloworld in the Package Explorer on the left and click run
under the run menu to let you choose what Way of running Select andorid application can then let you choose to run the device or Android emulator where

Copyright © Windows knowledge All Rights Reserved