Null Pointer Exception on accessing value of EditText

by Ankur Kumar » Fri, 20 May 2011 09:30:39 GMT


Sponsored Links
 Hello Developers,

Please help me with this problem. I am getting
java.lang.NullPointerException at step 3 in my code. Have not been
able to figure this out. The value I am entering in the EditText is
not empty.

                       1.  EditText IPInput = (EditText)
findViewById(R.id.ip);
                       2.  IPInput.getText().toString(); System.out.println(ip);
                       3.  System.out.println(IPInput.getText().toString());

--
Regards,
Ankur Kumar

-- 



Null Pointer Exception on accessing value of EditText

by Ankur Kumar » Fri, 20 May 2011 09:30:40 GMT


 Hello Developers,

Please help me with this problem. I am getting*java.lang.NullPointerException
* at step 3 in my code. Have not been able to figure this out. The value I
am entering in the EditText is not empty.

                       1.  EditText IPInput = (EditText)
findViewById(R.id.ip);
       2.  IPInput.getText().toString(); System.out.println(ip);
        3.  System.out.println(IPInput.getText().toString());



--
Regards,
Ankur Kumar

-- 


Sponsored Links


Other Threads

1. Please Help me find why htt pclient.execute(httppost)锛沘lways throws IOException

how is the header of httppost. is it correct?




-- 

2. Please Help me find why httpclient.execute(httppost)锛沘lways throws IOException

hey friend 
thanks 
 httppost.setEntity(reqEntity); //it is ok now ,not thorws IOException again,
but i try it in debug. find these error,can i  detain you some time to see this 
log:
 
12-10 12:41:07.719: ERROR/AndroidRuntime(1454): Uncaught handler: thread 
Thread-9 exiting due to uncaught exception
12-10 12:41:07.729: ERROR/AndroidRuntime(1454): java.lang.NullPointerException
12-10 12:41:07.729: ERROR/AndroidRuntime(1454):     at 
com.google.lm.Message.SendMessage.run(SendMessage.java:28)
12-10 12:41:07.729: ERROR/AndroidRuntime(1454):     at 
java.lang.Thread.run(Thread.java:1058)

and the response of httpServer must be wrong . ah,that bothers me.
also thank you for your advice.
my friend .

 
> 

3. multiple choice spinner !

4. Application developed in 1.5 r 3 not working in Motorola Droid

5. Fail to build Android platform source code, need help

6. just a small question of why there's no getBoolean() in Cursor?

7. access to sharedpreferences in com.android.email ?