Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2010, 10: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





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 12: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 12:31 AM
Page 55. Working with 3 projects? BradDotNet BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 24th, 2003 12:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.