- Download JDK- Java SE Development Kit - Windows x64 - (latest edition) and Install using default options
- Add a system variable JAVA_HOME and point it to the directory containing the contents of the JDK (example C:\Program Files\Java\jdk1.7.0_51)
- Add ;%JAVA_HOME%\bin; to the Path system variable.
- If you have a Proxy Server, note proxy server settings and:
- Start --> Type Java Control Panel
- General Tab --> Click Network Settings...
- Choose the appropriate settings, "use browser settings" may work for you.
- Validate Java Install:
- From a command prompt enter the following
java -version
- You should see something like :
java version "1.7.0_51"
- From a command prompt enter the following
- Download Apache Ant and extract to a directory on your computer. (example C:\util\ant\)
- Add a system variable ANT_HOME and point it to the directory containing the contents of the ANT directory
- Add ;%ANT_HOME%\bin; to the Path system variable.
- Validate Ant Install:
- From a command prompt enter the following
ant -version
- You should see something like :
Apache Ant(TM) version 1.9.3 compiled on December 23 2013
- Troubleshooting: Unable to locate tools.jar (check to see if JAVA_HOME is set properly)
- From a command prompt enter the following
- Download Android Studio and Install using default settings.
- If you have a Proxy Server, note proxy server settings and open Android Studio:
- File --> Settings --> (IDE Settings Section) --> HTTP Proxy
- Make the appropriate selection for your environment.
- Add a system variable ANDROID_HOME and point it to the directory containing the android sdk that's installed with Android Studio (example: C:\Users\jdoe\AppData\Local\Android\android-studio\sdk)
- Add the following to your Path system variable:
- ;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;
- If you have a Proxy Server, note proxy server settings and open Android Studio:
- Download Node and Install (if you already have it installed, download and install again to update it)
- Clear your NPM cache (this may save some headaches):
npm cache clean
- If behind a firewall, configure node to speak to the firewall by issuing the following commands:
npm config set proxy http://domain%5Cusername:password@ipaddress:port
npm config set https-proxy http://domain%5Cusername:password@ipaddress:port
- Validate Node Install:
- From a command prompt enter the following
node --version
- You should see something like :
v0.10.26
- From a command prompt enter the following
- Update Node & Global Packages
- Update Node:
npm update -g n
- Update Global Packages:
npm update -g
- Update Node:
- Clear your NPM cache (this may save some headaches):
- Install Cordova
npm install -g cordova
- Install Plugman
npm install -g plugman
- If behind a firewall, configure plugman to speak to the firewall by issuing the following commands:
plugman config set proxy http://domain%5Cusername:password@ipaddress:port
plugman config set https-proxy http://domain%5Cusername:password@ipaddress:port
- If behind a firewall, configure plugman to speak to the firewall by issuing the following commands:
Create a New Android Project
- In a command prompt, Navigate to a folder that will hold the project (example: C:\MobileApps)
- Create a new project:
cordova create MyFirstMobileApp com.companyName.MyFirstMobileApp MyFirstMobileApp
- Navigate to the new project folder:
cd MyFirstMobileApp
- Add the Android Platform:
cordova platform add android
https://github.com/simnova/webdevdocs/wiki/Installing-PhoneGap-and-Android-Studio-on-Windows
ไม่มีความคิดเห็น:
แสดงความคิดเห็น