Check to see if your et variable is null. I bet you that is the problem.


On Wed, Aug 26, 2009 at 8:46 AM, Small World <keamou...@gmail.com> wrote:

>
> 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 ?
>
> Many thanks~
> >
>


-- 
Donn
http://blog.donnfelker.com/

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