views:

515

answers:

1

I'm trying to follow the setup instructions on phonegap-android's wiki page, but I'm having trouble. I've got all of the prereqs/path variables/etc set-up, but when I execute the command (in gitbash as per the instructions) for building the project, I get errors which I do not understand.

Here is the script which I run:

$ ruby ./droidgap "C:/android-sdk-windows" pgtest com.example.android.pgtest "C
:/xfer/input" "C:/xfer/output"

and here is the result I get:

Building the JAR...
'/*' is not recognized as an internal or external command,
operable program or batch file.
'Licensed' is not recognized as an internal or external command,
operable program or batch file.
'contributor' is not recognized as an internal or external command,
operable program or batch file.
'this' is not recognized as an internal or external command,
operable program or batch file.
'The' is not recognized as an internal or external command,
operable program or batch file.
you was unexpected at this time.
Creating Android project for target level 8
Adding www folder to project...
Generating manifest...
Copying over libraries and assets and creating phonegap.js...
c:/Ruby192/lib/ruby/1.9.1/fileutils.rb:1418:in stat': No such file or directory
- c:/Users/<user>/Desktop/phonegap/framework/phonegap.jar (Errno::ENO
ENT)
from c:/Ruby192/lib/ruby/1.9.1/fileutils.rb:1418:in
block in fu_each_sr
c_dest'
from c:/Ruby192/lib/ruby/1.9.1/fileutils.rb:1432:in fu_each_src_dest0'
from c:/Ruby192/lib/ruby/1.9.1/fileutils.rb:1416:in
fu_each_src_dest'
from c:/Ruby192/lib/ruby/1.9.1/fileutils.rb:391:in cp'
from ./droidgap:82:in
copy_libs'
from ./droidgap:20:in run'
from ./droidgap:157:in
'

I've looked through the phonegap forums, and I've found some hits on part of the error (the part where phonegap.jar could not be found), but nothing on the first part ("_ is not recognized", etc.). What am I doing wrong? Thanks.

Additional info:
-Windows 7 (32 bit)
-ruby 1.9.1
-java jdk1.6.0_21
-ant 1.8.1

+2  A: 

Got it working. I remembered reading that windows users sometimes needed to add ".bat" to the end of certain commands, so I changed ant to ant.bat in the droidgap script and it worked.

Also, this guy had the same issue as me and I somehow missed it.

mlenarz