The company was using Windows7, so I had to do a configuration job under Windows, and I wrote it down.
The main trouble is to add a few environment variables under the Win7, this piece of place to be careful to add, the steps are very much, to give you a shot in the town, see the results of successful operation first, I also tested integrated an ad Alliance SDK, as shown:
Let's go...
Note: If I give the official download address below, please download it on your own, because my Win7 is 64-bit, may be a little different from yours. You have to download the correct installation package
1, download Nodejs, and install
One step after installation
2, download the Android SDK
When the download is complete, unzip it and place it in a folder, such as the folder where I placed it:
e:frameworksadt-bundle-windows-x86_64-20131030
It should look like this:
At this point you have only an Android SDK manager, and the real Android SDK needs to be downloaded further.
Double-clicking the SDK Manager.exe opens the SDK Manager and downloads the Android SDK kit you need, as shown in:
Add the Android SDK to the computer Global environment variable
Right-click Select Properties on the computer open-> System panel-> advanced system settings-> environment variable-> system variable 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 that you just placed the Android SDK folder path
And then find the path variable in the system variable, and if not, you build one yourself.
Double-click the variable to add it to the variable value:
;%android_home%tools
Don't forget to have a ";" Semicolon....
New
Variable name: android_adb
Variable Value: E:frameworksadt-bundle-windows-x86_64-20131030sdkplatform-tools
Also add in the PATH variable:
;%android_adb%
3. Download Java JDK
Recommended download jdk1.6 version installed, too high eclipse may not be able to 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 to the JDK on my computer, your computer has to be replaced by the path to your own JDK folder.
New
Variable name: CLASSPATH
Variable Value:
.; %java_home%lib;%java_home% Libtools.jar
Don't forget the "." At the front. Number OH
Also add in the PATH variable:
;%java_home%bin;%java_home%jre Bin
4. Download Ant
Ant is a project in Apache
Don't ask what why install this, anyway not installed in PhoneGap add Android platform will error
Adding ant to the Global environment variable
New
Variable name: ant_home
Variable Value: d:apache-ant-1.9.3
Add in Path variable:
;%ant_home%bin
Well, the added system variables are basically done, big project, huge trouble, don't make a mistake. Want to check which item in the system variable has not been added successfully, as long as in the CMD command-line tool to enter the name of the item to return to see if there is no response, such as the input node-v if the version number will be displayed, which means that the installation was successful
5. The next step is to install Eclipse
In fact, Eclipse does not install is also possible, but strongly recommend that the installation, the full use of 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, and if not, go to the official download.
6, download ADT Package for Eclipse use
When the download is complete, open Eclipse select Help->install New Software
Open the Install panel and click Add ... button, then click Archive ... button to find the ZIP package you just downloaded, and make sure you install the restart Eclipse
7, Installation phonegap3.x (Cordova)
PhoneGap was renamed as Cordova after being acquired by Adobe, so the following is called Cordova.
Enter in the CMD command-line tool
NPM install-g Cordova
Nodejs will help you install Cordova.
8. Establish Cordova Project
Open the CMD command line tool and navigate to the directory where you want to create the project.
Cordova Create Hello Com.example.hello "HelloWorld"
It means to suggest a Hello folder and suggest a Cordova item in the folder called "HelloWorld"
Com.example.hello can be said to be the ID of your project, temporarily do not care
Enter the Hello folder
CD Hello
Add Android Platform Project
Cordova Platform Add Android
Okay, there's an Android project under the Platforms folder under the Hello folder.
9, open the Android project with Eclipse
Open Eclipse
Select Import under the File menu to open the Import panel
Select android->existing Android code into workspace and click Next
Open the Import Project panel and click Browse ... button to find the Android file under the Helloplatforms folder you just created
Click Finish to import the project,
As shown in figure:
Select HelloWorld in the package view on the left (Package Explorer) and click Run under the Run menu
Lets you choose which way to run, choose Andorid Application, and then let you choose where to run the device or the Android emulator