简体   繁体   中英

Create a new Android PhoneGap project either via the command line tools

I am developing Android Application using jQuery Mobile and Phonegap and as I mention in the question I need to open Android project through Command Line, I set 3 path in my Environmental Variable.

  1. ANT_HOME (C:\\Program Files\\apache-ant-1.9.4-bin\\apache-ant-1.9.4\\bin)
  2. JAVA_HOME (C:\\Program Files\\Java\\jdk1.7.0_07)
  3. PATH (C:\\Program Files\\Java\\jdk1.7.0_07\\bin)

I download the latest version of Phonegap, then in command line i give path to phonegap folder.

cd C:\Users\UserName\Desktop\phonegap\phonegap-2.9.1\phonegap-2.9.1\lib\android\bin

It's working good then I type

create (path of folder to create App)com.example.project DemoApp

output is:

Cannot not locate ant.bat using the PATH variable.

You need to add the ANT_HOME to the PATH variable.

Open the console window and type the following

set PATH=%PATH%;%ANT_HOME%

or You could do it by changing the PATH environment variable in the window below.

MyComputer->Properties->Advanced->Env Variables->Path. 

EDIT1: Check the following links for installing cordova/phonegap.

http://thejackalofjavascript.com/phonegap-3-cli-setup-mac-windows/

http://coenraets.org/blog/cordova-phonegap-3-tutorial/

http://teusink.blogspot.in/2013/07/guide-phonegap-3-android-windows.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM