Phonegap
Existem 3 posts arquivados em Phonegap
Guia Rápido para Instalar e rodar o Cordova / Phonegap no Windows
Algumas pessoas que eu conheço tiveram problemas na hora de instalar o Phonegap no Windows e resolvi fazer esse guia rápido de como instalar e rodar o phonegap sem problemas.
1. Instale o Node.js
Vá na página http://nodejs.org/ e clique no botão install que você vai baixar um arquivo de instalação para windows .msi
2. Instale o Git
Vá em http://git-scm.com/downloads e baixe o Git Installer
Depois configure as variáveis globais do git, então abra o cmd e coloque essas duas linhas:
$ git config --global user.name "Seu Nome"
$ git config --global user.email [email protected]
3. Instale o Phonegap
Abra o cmd e digite:
npm install -g phonegap
4. Faça o Download do Java JDK
Faça Download do Java JDK desse endereço: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
5. Faça o Download do ANT
Dessa página aqui: http://ant.apache.org/bindownload.cgi depois descompacte os arquivos em algum lugar
6. Faça Download do ADT Bundle
Dessa página http://developer.android.com/sdk/index.html#download e descompacte os arquivos em algum lugar.
7. Configure o Path do Windows
Do desktop, clique com o botão direito em Meu Computador e depois em Propriedades
Clique em Configurações Avançadas na coluna da esquerda
Na janela de Propriedades de Sistema clique no botão Variáveis de Ambiente.
Selecione a variável PATH da seção de Variáveis do Sistema
Clique em Editar.
Dentro da pasta do ADT Bundle que você descompactou pegue o caminho completo até a pasta \sdk\tools e adicione no final da variável PATH.
Copie o caminho para \sdk\platform-tools para a variável PATH também
8. Configure o JAVA_HOME
Crie uma nova variável de ambiente chamada JAVA_HOME e coloque o caminho para o JDK nessa variável. Fica alguma coisa como “C:\Program Files\Java\jdk1.8.0_05“
9. Configure o ANT_HOME
Crie uma nova variável de ambiente chamada ANT_HOME e coloque o caminho da pasta ANT que você descompactou.
10. Crie e Lance um Hello World
Usando o cmd escreva:
phonegap create hello
cd hello
phonegap run android
Dentro da pasta do projeto hello, crie um arquivo index.html e coloque na pasta www.
Conteúdo de index.html:
<html><body>Hello World</body></html>
Depois use o cmd novamente :
phonegap run android
E veja o Hello World na tela do seu telefone
Gostou? Me segue no Insta!
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 [email protected]
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.