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. Eclipse ADB Error

I just recently set up the SDK and Eclipse by following the
instructions step-by-step and now every time I access anything Android
related in Eclipse, it pops up saying "Failed to parse the output of
'abd version'". I try to continue on running the project and this pops
up in the console:

[2010-06-14 17:39:40 - HelloAndroid] The connection to adb is down,
and a severe error has occured.
[2010-06-14 17:39:40 - HelloAndroid] You must restart adb and Eclipse.
[2010-06-14 17:39:40 - HelloAndroid] Please ensure that adb is
correctly located at 'C:\Android\tools\adb.exe' and can be executed.

I've killed all of the adb.exe processes and restarted eclipse, yet
nothing is changing. Is there any fix for this problem? Thanks.

-- 

2. Sqlite database problem

I am developing a simple android application in that I am getting
serious error that system stops unexpectedly. help me out there,and
also I want to know that how should I enter path in DBHelper.java
file .Here I am giving my code.

-- 

3. WebView TextBox

4. LOG: 'obtainBuffer timed out (is the CPU pegged?)'

5. Custom View in a XML Layout

6. Webview Java vs Javascript Performance

7. how to move imagebuttons according to mouse movement?