p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Android 2 Application Development (http://p2p.wrox.com/forumdisplay.php?f=547)
-   -   projects not working after chapter 8 (http://p2p.wrox.com/showthread.php?t=81206)

fladenbr0t October 11th, 2010 10:33 PM

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


All times are GMT -4. The time now is 08:24 PM.

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