Phonegap Android

53 views
Skip to first unread message

xzmatze

unread,
Mar 30, 2010, 2:09:04 PM3/30/10
to phonegap
Hi,

i set everything up like described here
http://phonegap.pbworks.com/Getting-started-with-Android-PhoneGap-in-Eclipse
.

But now I'm stuck at 10) ..

That's what I enter in cmd:

cd C:\phonegap-phonegap-android-87dd64d

ruby ./droidgap C:\android-sdk_r05-windows\android-sdk-windows myApp
com.phonegap.android example c:\myApp


That's what I get:

C:\phonegap-phonegap-android-87dd64d>ruby ./droidgap C:\android-
sdk_r05-windows\

android-sdk-windows IATA com.phonegap.android example c:
\IAkjTA22dkkfdfka

Building the JAR...

Creating Android project... 5

Adding www folder to project...

Generating manifest...

Copying over libraries and assets and creating phonegap.js...

C:/Ruby/lib/ruby/1.8/fileutils.rb:1200:in `stat': No such file or
directory - C:

/phonegap-phonegap-android-87dd64d/framework/phonegap.jar
(Errno::ENOENT)

from C:/Ruby/lib/ruby/1.8/fileutils.rb:1200:in `lstat'

from C:/Ruby/lib/ruby/1.8/fileutils.rb:1178:in `stat'

from C:/Ruby/lib/ruby/1.8/fileutils.rb:1260:in `copy_file'

from C:/Ruby/lib/ruby/1.8/fileutils.rb:463:in `copy_file'

from C:/Ruby/lib/ruby/1.8/fileutils.rb:383:in `cp'

from C:/Ruby/lib/ruby/1.8/fileutils.rb:1395:in
`fu_each_src_dest'

from C:/Ruby/lib/ruby/1.8/fileutils.rb:1409:in
`fu_each_src_dest0'

from C:/Ruby/lib/ruby/1.8/fileutils.rb:1393:in
`fu_each_src_dest'

from C:/Ruby/lib/ruby/1.8/fileutils.rb:382:in `cp'

from ./droidgap:82:in `copy_libs'

from ./droidgap:20:in `run'

from ./droidgap:157


-> He did not create phonegap.jar, but why?


My Configuration:

-Windows XP SP3
-Master from here http://github.com/phonegap/phonegap-android

-Because of an earlier error i changed (like described in the wiki)
"`#{android_exec} create project -t #{ target_id } -k #{ @pkg } -
a#{ @name } -n #{ @name } -p #{ @path }`"
to
"`android create project -t #{ target_id } -k #{ @pkg } -a #{ @name } -
n #{ @name } -p #{ @path }`"

-Env Variables:
ANT_HOME: C:\apache-ant-1.8.0-bin\bin
(that's not in the wiki, but without it i get "BUILD FAILED"...


JAVA_HOME: C:\Programme\Java\jdk1.5.0_21
(tryed the newest too. same..)


PATH: C:\Ruby\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%
\System32\Wbem;C:\Programme\GnuWin32\bin;C:\Programme\Java
\jdk1.6.0_18\bin;C:\android-sdk_r05-windows\android-sdk-windows
\tools;C:\apache-ant-1.8.0-bin\bin

Any ideas?

xzmatze

unread,
Apr 1, 2010, 5:10:04 AM4/1/10
to phonegap
Update:

I followed this ( http://ant.apache.org/manual/install.html#checkInstallation
) to verify my ENV Variables.

Configuration:
===========================================
ANT_HOME:
C:\apache-ant-1.8.0-bin
-------------------------------------------


JAVA_HOME:
C:\Programme\Java\jdk1.5.0_21

-------------------------------------------


PATH:
C:\Ruby\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%

\System32\Wbem;C:\Programme\GnuWin32\bin;%JAVA_HOME\bin;C:\android-
sdk_r05-windows\android-sdk-windows\tools;%ANT_HOME%\bin
===========================================

So, now if I try it with the original droidgap file:
===========================================


C:\phonegap-phonegap-android-87dd64d>ruby ./droidgap C:\android-
sdk_r05-windows\

android-sdk-windows myApp com.phonegap.android example c:\myApp

Building the JAR...

BUILD FAILED
C:\phonegap-phonegap-android-87dd64d\framework\build.xml:49: taskdef
class com.a
ndroid.ant.SetupTask cannot be found
using the classloader AntClassLoader[]

Total time: 0 seconds
Creating Android project... 5
./droidgap:48:in ``': No such file or directory - "C:\android-sdk_r05-
windows\an
droid-sdk-windows/tools/android" create project -t 5 -k
com.phonegap.android -a
myApp -n myApp -p c:\myApp (Errno::ENOENT)
from ./droidgap:48:in `create_android'
from ./droidgap:17:in `run'
from ./droidgap:157
=========================================

When I change the line in droidgap (like described in the tutorial):
=========================================


C:\phonegap-phonegap-android-87dd64d>ruby ./droidgap C:\android-
sdk_r05-windows\

android-sdk-windows myApp com.phonegap.android example c:\myApp

Building the JAR...

BUILD FAILED
C:\phonegap-phonegap-android-87dd64d\framework\build.xml:49: taskdef
class com.a
ndroid.ant.SetupTask cannot be found
using the classloader AntClassLoader[]

Total time: 0 seconds


Creating Android project... 5
Adding www folder to project...
Generating manifest...
Copying over libraries and assets and creating phonegap.js...
C:/Ruby/lib/ruby/1.8/fileutils.rb:1200:in `stat': No such file or
directory - C:
/phonegap-phonegap-android-87dd64d/framework/phonegap.jar
(Errno::ENOENT)
from C:/Ruby/lib/ruby/1.8/fileutils.rb:1200:in `lstat'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:1178:in `stat'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:1260:in `copy_file'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:463:in `copy_file'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:383:in `cp'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:1395:in
`fu_each_src_dest'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:1409:in
`fu_each_src_dest0'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:1393:in
`fu_each_src_dest'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:382:in `cp'
from ./droidgap:82:in `copy_libs'
from ./droidgap:20:in `run'
from ./droidgap:157


Here, I can' get any further..

Baudouin

unread,
Apr 1, 2010, 6:57:10 AM4/1/10
to phonegap
It looks like it can't copy phonegap.jar
From within the directory in wich you are running the ruby command,
you should have a "framework" dir.
Verify that this "framework" dir. does contains "phonegap.jar"

If this jar exists at the right place then I think that I can't give
you more advice as I am a newbie...

Except this last thing:
On my windows computer, your command would look like this:
C:\phonegap-phonegap-android-87dd64d>ruby droidgap C:/android-sdk_r05-
windows/android-sdk-windows myApp com.mycomp.test example c:/myApp
(I am using forward slash and not the phonegap name for the package
name)


On 1 avr, 11:10, xzmatze <xzma...@aol.com> wrote:
> Update:
>
> I followed this (http://ant.apache.org/manual/install.html#checkInstallation

xzmatze

unread,
Apr 1, 2010, 7:37:26 AM4/1/10
to phonegap
Hi, thanks for the answer.

It worked, now I have the phonegap.jar and can continue!

Maybe the tutorial should give an example for this syntax. It's not
naturally to take "/" in a Windows XP path.

================================================================
C:\phonegap-phonegap-android-87dd64d>ruby ./droidgap C:/android-
sdk_r05-windows/
android-sdk-windows final com.test example c:/final
Building the JAR...


Creating Android project... 5
Adding www folder to project...
Generating manifest...
Copying over libraries and assets and creating phonegap.js...

Adding some application name to strings.xml...
Writing application Java code...
Complete!
================================================================

Reply all
Reply to author
Forward
0 new messages