>
> A reference to tv has to be set outside onCreate()
>

TextView tv has to be a member variable.

Inside the onCreate() tv is short lived.



>
>    02-24 16:09:25.374: ERROR/AndroidRuntime(537): Caused by:
> java.lang.NullPointerException
>    02-24 16:09:25.374: ERROR/AndroidRuntime(537):     at
> it.prova.EmptyActivity.onCreate(EmptyActivity.java:22)
>    02-24 16:09:25.374: ERROR/AndroidRuntime(537):     at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1047)
>    02-24 16:09:25.374: ERROR/AndroidRuntime(537):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2627)
>    02-24 16:09:25.374: ERROR/AndroidRuntime(537):     ... 11 more
>
> I'm using sdk r11 and adt v10.
>
> I think there is a problem with resources.
>
> Any idea?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to