terça-feira, 9 de setembro de 2014

Installing NodeJS, PhoneGap, Ant, Android SDK on Windows 8

1. Introduction


This post gathers information about and show steps for installation of phonegap


2. Step-by-Step



  • Step#1: Install  NodeJS


- http://nodejs.org/
- Execute Installer of NodeJS



  • Step#2: Install PhoneGap


// - Windows >> Search :: Search for "node.js command prompt" and execute
- C:\> npm install -g phonegap
- C:\> npm install -g cordova
- Unzip PhoneGap into C:\Program Files\
+ Set Windows Environment Variables
  - PATH=%PATH%;C:\Program Files\phonegap-2.9.1\lib\android\bin


  • Step#3: Install Apache Ant for Windows


- Download binary from http://ant.apache.org/bindownload.cgi
- Execute installer
+ Set Windows Environment Variables
  - ANT_HOME=C:\PROGRA~1\APACHE~1.4
  - PATH=%PATH%;%ANT_HOME%\bin


  • Step#4: Install JAVA JDK


+ Set Windows Environment Variables
  - JAVA_HOME=C:\Program Files\Java\jdk1.7.0_60
  - PATH=%PATH%;%JAVA_HOME%\bin


  • Step#5: Install ADK (Android Development Kit) and Adding SDK Packages


- Download http://developer.android.com/sdk/index.html
+ Set Windows Environment Variables
  - ANDROID_HOME=C:\Program Files\adt-bundle-windows-x86_64\sdk
  - PATH=%PATH%;%ANDROID_HOME%\platform-tools;C:\Program Files\adt-bundle-windows-x86_64\sdk\tools

+ Adding SDK Packages
  - Read http://developer.android.com/sdk/installing/adding-packages.html
  - Run %ANDROID_HOME%\eclipse\eclipse or %ANDROID_HOME%\SDK Manager
  + In Eclipse or Android Studio, click SDK Manager
    + Get the latest SDK tools
      - [X] Android SDK Tools
      - [X] Android SDK Platform-tools
      - [X] Android SDK Build-tools (highest version)
      - [X] SDK Platform
      - [X] ARM EABI v7a System Image
    + Get the support library for additional APIs
      - [X] Android Support Repository
      - [X] Android Support Library
    + Get Google Play services for even more APIs
      - [X] Google Repository
      - [X] Google Play services
      + Install the packages



  • Step#6: To solve "The Import android.support.v7 cannot be resolved" do

Click add external jars "%ANDROID_HOME%/sdk/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar" to Java Build Path



  • Step#7: Run Eclipse ditributed with Install ADK - Android SDK for Windows

a)

C:\..\> cd "%HOMEPATH%\Documents\Evaluation\PhoneGap"
C:\..\>REM create <sub-directory> <package-name> <app-name>
C:\..\> create hello br.com.josemar.hello HelloWorld

b)

- C:\> C:\Program Files\adt-bundle-windows-x86_64-20140702\eclipse\eclipse
- Enter new path for ADK projects Ex: %HOMEPATH%\workspace-adt-bundle-windows
+ Create New Project:
  + Eclipse ADK :: File >> New >> Project
    - Wizard :: Android Project from Existing Code
      - Import Projects :: [Browse...] Root Directory: C:\Users\Josemarsilva\Documents\Evaluation\Phone Gap\projeto



3. References




Nenhum comentário:

Postar um comentário