Correct, The correct order for your onCreate() method is like:
super.onCreate(savedInstanceState); setContentView(R.layout.main); this.myTextView = (TextView)findViewById(R.id.myTextView); I *believe* that your myTextView ends up being null. Your handler/thread code looks ok. On Fri, Oct 1, 2010 at 1:33 PM, Prakash Iyer <[email protected]> wrote: > Can you call the findViewById before the setContentView? If not the text > view member is null and that's your problem... > > On Fri, Oct 1, 2010 at 2:54 PM, TreKing <[email protected]> wrote: >> >> On Wed, Sep 29, 2010 at 9:37 PM, EightBitSpade <[email protected]> >> wrote: >>> >>> Unfortunately, I don't exactly what this means, but I gather that the >>> problem comes from an uncaught exception occuring in "threadid=1", >>> that it was a java.lang.NullPointerException, and that it had >>> something to do with handleMessage. Am i correct in this >>> interpretation? >> >> Yes. >> >>> >>> And can anyone give me pointers on what I'm doing wrong here? >> >> If you look at the message, it also tells you exactly what line it's >> crashing on. So it's only a matter of using your debugger and stopping on >> the line that's it's throwing the exception on and seeing what's null at >> that point. From there, "walk back" to see what calls what along the path to >> that point to see where the variable that is null is being sent from and why >> it's not initialized. >> >> >> ------------------------------------------------------------------------------------------------- >> TreKing - Chicago transit tracking app for Android-powered devices >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://developingthedream.blogspot.com/, http://diastrofunk.com, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

