Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android 2 Application Development
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 11th, 2010, 11:33 PM
Registered User
 
Join Date: Oct 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default projects not working after chapter 8

In every Earthquake Project is this error still inside the earthquakeprovider:

Code:
    private static final String DATABASE_CREATE =
      "create table " + EARTHQUAKE_TABLE + " (" 
      + KEY_ID + " integer primary key autoincrement, "
      + KEY_DATE + " INTEGER, "
      + KEY_DETAILS + " TEXT, "
      + KEY_LOCATION_LAT + " FLOAT, "
      + KEY_LOCATION_LNG + " FLOAT, "
      + KEY_MAGNITUDE + " FLOAT), "
      + KEY_LINK + " TEXT);";
But that was easy to fix! Otherwise its very sad that the error is still in the downloadable projects.

The "Where I am" project is working on my simulator but no location is shown, cant send a location to the simulator.
I am not sure why.

Chapter 9 Earthquake again forced close ;(
Code:
10-12 02:29:11.445: ERROR/AndroidRuntime(249): Uncaught handler: thread main exiting due to uncaught exception
10-12 02:29:11.484: ERROR/AndroidRuntime(249): java.lang.RuntimeException: Unable to start service com.paad.earthquake.EarthquakeService@44ea0f78 with Intent { cmp=com.paad.earthquake/.EarthquakeService }: java.lang.ClassCastException: java.lang.String
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2882)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at android.app.ActivityThread.access$3500(ActivityThread.java:119)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1926)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at android.os.Looper.loop(Looper.java:123)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at android.app.ActivityThread.main(ActivityThread.java:4363)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at java.lang.reflect.Method.invokeNative(Native Method)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at java.lang.reflect.Method.invoke(Method.java:521)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at dalvik.system.NativeStart.main(Native Method)
10-12 02:29:11.484: ERROR/AndroidRuntime(249): Caused by: java.lang.ClassCastException: java.lang.String
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at android.app.ApplicationContext$SharedPreferencesImpl.getInt(ApplicationContext.java:2579)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at com.paad.earthquake.EarthquakeService.onStartCommand(EarthquakeService.java:50)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2873)
10-12 02:29:11.484: ERROR/AndroidRuntime(249):     ... 10 more
the first 5 chapter i was happy to find a book with good code i can type directly from the book. in chapter 6 the struggle begun, i had to check the downloaded projects and in after chapter 7 even when i import the downloaded project are not working! i am really upset now and even dont want to read on. :(
would be good if even the downloadable projects would work!


chris
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Browsed web projects don't appear in recent projects list? Ron Howerton Visual Studio 2008 0 June 23rd, 2010 01:52 PM
Working through Chapter 1 Geoffrey Chambers BOOK: Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 ISBN: 978-0-470-12449-9 1 January 2nd, 2010 11:38 PM
Chapter 3 - a:visited not working VeganMan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 April 3rd, 2008 01:31 AM
Page 55. Working with 3 projects? BradDotNet BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 24th, 2003 01:52 PM



All times are GMT -4. The time now is 06:26 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.