27
Oct

Phonegap - Hellow world

   Posted by: admin   in Mẹo vặt của hiếu râu

download android sdk, adt, unzip vao c:\adt

$ android create avd –name avd19 –target android-19

download nodejs http://nodejs.org/download/ , chon windows bin 32 hoac 64 bits, copy vao c:\adt\node.exe

download npm, http://nodejs.org/dist/npm/ , unzip vao c:\adt\

download http://ant.apache.org/ , unzip vao c:\adt\ant , set PATH=c:\adt\ant\bin

C:\> npm install -g phonegap

$ phonegap create my-app
$ cd my-app
$ phonegap install android
$ phonegap run android

$ plugman install –platform android –project “c:\adt\my-app\platforms\android” –plugin org.apache.cordova.device

$ phonegap local plugin add org.apache.cordova.device
DEBUG tool
$ npm -g install weinre
$ weinre --boundHost yourIP
open web http://yourIP:8080/client
put this line to www/index.html
<script src="http://yourIP:8080/target/target-script-min.js"></script>

This entry was posted on Monday, October 27th, 2014 at 10:43 am and is filed under Mẹo vặt của hiếu râu. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment