• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PhoneGap/Eclipse: but none of the examples work ch.2 (ch.1 no examples)

 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I try use the book: Beginning PhoneGap - Mobile Web Framework for JavaScript and HTML5, by Rohit Ghatol , Yogesh Patel | published 22 Feb 2012

but none of the examples work ch.2 (ch.1 no examples)...

I submit to Eclipse attachments, code here: https://bitbucket.org/rohitghatol/apress-phonegap/src/67848b004644/android/PhoneGap-DeviceInfo?at=default
apress-phonegap-book-error-in-all-exa2.jpg
[Thumbnail for apress-phonegap-book-error-in-all-exa2.jpg]
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried exa like was without modify...

see another attachment...
apress-phonegap-book-error-in-all-exa3.jpg
[Thumbnail for apress-phonegap-book-error-in-all-exa3.jpg]
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
android 2.2 + enough old phone gap 1.1
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Leonidas Savvides wrote:android 2.2 + enough old phone gap 1.1


Is that the solution or is that just a random statement?
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is info about project ... you may download & try,... I have Eclipse Juno
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So the problem persists...

I don't think I am about to set up a phonegap environment to test your problem. Here is what I can say:

1) At least on my machine, Eclipse can be a bit of a jerk and randomly decides to not build a working application. This has various and weird behaviour at runtime. Whenever something happens that makes no sense to me, the first thing I do is do Project > clean.

2) The ClassNotFoundException is pretty singular in its cause. If it persists after a clean build it means your class is not found in the classpath. Have you built your Manifest correctly?
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
added jars need to re-added after a CLEAN executed?
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Leonidas Savvides wrote:added jars need to re-added after a CLEAN executed?


Can you please get in the habit of using full sentences? Reading short blurbs like this make it hard to tell what you mean. I think you are asking if a JAR you added to the build path needs to be re-added to the build path after you do Project > clean. If that is the question: the answer is no.
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes this meant... about jar... were included before import...Well, seems impossible to debug... have you have time to download code and run it (org.examples.phonegap.deviceinfo)?

the matter that is very old phonegap version... well?
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.apress.com/9781430239031

download here^
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hopefully someone else will have time to download and setup a new application environment to help you, but I can not.

I have two last suggestions for you though:
1) Make sure the JARs are selected for export in the Project > Preferences > Java Build Path > Order and Export tab

2) Perhaps someone at PhoneGap can help you out, do they have forums or a support site/email?
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if a book refers to relatively very old version of phonegap should still function in a new IDE?
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Leonidas Savvides wrote:if a book refers to relatively very old version of phonegap should still function in a new IDE?


That depends on the changes between versions. You should:
1) Try to use up to date books when possible, because you will know the latest changes/improvements and will not be stuck using old APIs or strategies which have been replaced with newer more effiecient APIs

2) Read the documentation to see what changes have been made between versions, and check out compatibility lists

3) If all else fails, contact Phonegap to see if they can help you. Phonegap is pretty heavy and specialized, it is not something all mobile developers will use. So it is less likely that you can get good support from third party forums like this one, since there will be a small pool of people who actually use the product. You will be more likely to get answers from Phonegap themselves, or from forums dedicated to the product if they exist.
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A.
I went to phonegap site at:
Getting Started with Android

http://docs.phonegap.com/en/2.5.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android

I followed the above
4. Setup New Project
but got
'.' is not recognized as an internal or external command,
operable program or batch file.

can you provide a sample create command? Also Ant come pre-installed when install java 6?


is the ./create command an ant command ,...? http://docs.phonegap.com/en/2.4.0/guide_getting-started_android_index. md.html#Getting%20Started%20with%20Android describes this command ....

b.
CLI used with phonegap project create, most recent version?

c.
if I install JDK 7 , to my ANDROID development PC. android tools should continue to operate???
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Leonidas Savvides wrote:but got
'.' is not recognized as an internal or external command,
operable program or batch file.


Then you either didn't install all the prerequisites, or you didn't follow their directions well enough, or their directions aren't any good.

can you provide a sample create command? Also Ant come pre-installed when install java 6?


I don't use Phonegap (as I have said) and so don't know what a valid command would look like. I don't think Ant comes with Java6, but it does come with Eclipse.


is the ./create command an ant command ,...?


No, nor is it a Windows or Linux command. My guess is that it is something from Phonegap

CLI used with phonegap project create, most recent version?


What is CLI in this context? Can you ask phonegap? They would know best.

if I install JDK 7 , to my ANDROID development PC. android tools should continue to operate???


Android SDK and Eclipse will operate. But you can't use any of the Java 7 features in code, because Android only uses Java 5 with some of Java 6. So you need to build targeting Java 6.
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Building a phone gap with dreamweaver cs6 and jquery mobile requires jquery , jquery mobile libraries as well only PhoneGap.js for phone gap, or anything else from PhoneGap?

I build my sample under a textbook app in dw cs6 but book was for cs5.5 not cs6 , you have any idea where insert Application settings...in cs6...?

Also in Menu - PhoneGap service compile appear only insert Android sdk and web os sdk location either in my mac or windows...PCs... How appear to insert the other platforms sdk locations...?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic