View Single Post
  #10 (permalink)  
Old December 1st, 2013, 07:09 PM
Markstar Markstar is offline
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2013
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts

Originally Posted by uler3161 View Post
My gut feeling was that your development environment has an issue. And then I found this:
Ahh, thank you. This actually solved a lot of my issues and I have a working AVD without errors now, yeah! However, since I will be receiving my android device tomorrow (Moto G), which I hope I will be able to update to 4.4 eventually, developing for API19 would be nice...

The other issues about the view hierarchy probably has something to do with updating the UI on a non-UI thread. I don't remember the book code having this problem though.

NullPointerException probably isn't network related. I don't have the book in front of me, but I don't think the GForce meter example used a network connection. All I can tell you is there is an object on line 95 is null and it probably shouldn't be. Or it needs a null check.
Hmm, most of the errors are gone now, but the NullPointerException remains:
E/AndroidRuntime(1159): FATAL EXCEPTION: Thread-102
E/AndroidRuntime(1159): java.lang.NullPointerException
E/AndroidRuntime(1159): at com.paad.earthquake.EarthquakeListFragment.refresh Earthquakes(
E/AndroidRuntime(1159): at com.paad.earthquake.EarthquakeListFragment.access$ 0(
E/AndroidRuntime(1159): at com.paad.earthquake.EarthquakeListFragment$
E/AndroidRuntime(1159): at
By now I have, besides trying it on two different PC, even reinstalled Windows 7 on a fresh hard drive with only 32bit versions (I usually run Win7 x64 and thought maybe that could be a source for issues). Still the same thing (I experimented with all variations of API11 and API18 again).

I would be really interested if this actually works on somebody's AVD (and then, of course, how)!

Thank you again for your time!