Hi.. While clicking the button1 that is redbtn.setOnClickListener(new OnClickListener() {
@Override public void onClick(View v) { Toast.makeText(getBaseContext(), "Latitude :" + latitude.toString(), Toast.LENGTH_SHORT). show(); } }); Here it will show the exception On Sep 29, 1:45 am, TreKing <treking...@gmail.com> wrote: > On Tue, Sep 28, 2010 at 3:41 PM, Gold <thangadura...@gmail.com> wrote: > > 09-29 02:09:46.636: ERROR/AndroidRuntime(2995): Caused by: > > java.lang.NullPointerException > > 09-29 02:09:46.636: ERROR/AndroidRuntime(2995): at > > com.sample.test.Home.onCreate(Home.java:38) > > Now which part of your code is at line 38? > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/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 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