em cordova, Git, phonegap

Quick Guide To Install Phonegap and get it running on windows

Some people I know had trouble to install Phonegap on Windows, so I made this quick guide.

1. Install Node.js
Go to http://nodejs.org/ and click the Install button to download a msi file

2. Install Git

Go to http://git-scm.com/downloads and download a git installer

Set Git Config GlobalOpen a bash and add this two lines:

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

3. Install Phonegap

npm install -g phonegap

4. Download Java JDK

Download a Java JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

5. Download ANT

From http://ant.apache.org/bindownload.cgi and unzip it somewhere

6. Download the ADT Bundle

From http://developer.android.com/sdk/index.html#download and unzip it somewhere

7. Configure Path

From the Desktop, right-click My Computer and click Properties.
Click Advanced System Settings link in the left column.
In the System Properties window click the Environment Variables button.
Select the PATH variable from the System variables section.
Select the Edit button.
Inside the ADT Bundle folder that you unzipped, copy the path for \sdk\tools and add to the PATH variable.
Copy the path for \sdk\platform-tools to the PATH variable too.

8. Configure JAVA_HOME

Create a new Environment Variable named JAVA_HOME and add the path to your JDK to this variable. It is something like that “C:\Program Files\Java\jdk1.8.0_05”

9. Configure ANT_HOME

Create a new Environment Variable named JAVA_HOME and add the path to the ANT folder that you unzipped

10. Create and Launch a Hello World

Using the shell type:

phonegap create hello
cd hello 
phonegap run android

Inside your hello project directory,  create an index.html file into www folder.
Content of index.html file:

<html><body>Hello World</body></html>

then use the shell again :

phonegap run android

And see the Hello World on your phone.

 

Escreva um comentário

Comentário

Esse site utiliza o Akismet para reduzir spam. Aprenda como seus dados de comentários são processados.

Webmentions

  • 9 Dicas de Como ganhar Hackathons

    […] seu inimigo durante o hackathon. Se você perder uma hora pra configurar alguma coisa ou instalar o Phonegap no windows pode acabar sendo prejudicado e vai acabar irritando o pessoal do seu […]