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. Making something happen in an activity from another thread.

I know about AsyncTask, and I use it for this
in some cases, but I was wondering whether
there is another way for a background thread
to initiate a call to the UI thread.  In some
cases I have the UI thread polling to look for
changes in the database, but that is kludgy.

Thanks,

Toby

--

2. Eclipse IDE missing Android documentation

Hello Android developers

I have managed to install the android SDK within Eclipse. I can create
a shell Android application with the design pane etc. However although
the documentation was installed, along with the example Android
applications, the documentation is not in-line and the example code is
not accessible.

I would like the documentation in-line like the in-line documentation
for Eclipse itself, it would make it much easier and more convenient
as well as accessing the example code. How do I do this?

Put simply, again...

1: How do I make the documentation for Android accessible like the
documentation for Eclipse.

2: How do I make the examples accessible like the android classes.

Andrew Sprott

-- 

3. Problems in creating an android chat application

4. accessing widget in Dialog during unit test

5. Use Gallery to display my app image

6. application not installed

7. help -> how to connect Android Terminal to PC(ubuntu10.10