>
> The error java.lang.nullpointerexception occurred when I was getting
> the value from EditText. The code was like as follows:
>
> EditText et = (EditText) findViewById(R.id.et);
> String str =  et.getText().toString();
>
> I have no idea what is wrong with it, can anyone help me ?

Most likely, your et variable is null. You may not have a widget with
android:id="@+id/et" in your activity.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~---------~--~----~------------~-------~--~----~
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