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. Shipping to US - what shipping options?

I am not from the US but i have family that will go there for a few
days. Given the ridiculous amount asked for shipping to europe, my
goal is to get the dev phone shipped to the US why my relatives are
there.

However, I can nowhere see how much it takes to ship whithin the US,
or if there are different shipping options. I do not want to pay the
$25 just to check the shipment methods which are available, either.
(Depending on how it goes i might buy it from google or just a G1 from
somewhere else)

Anyone knows from experience how much it really takes to ship the dev
phone within the US ?
Maybe someone could point me to the information i might have missed?

Thanks!

--~--~---------~--~----~------------~-------~--~----~

2. How to get the SDK running on fedora

I decided to try to run the SDK on a x86-64 fedora install. It is not
to hard to get working once you know the packages you need. The things
I had to install to get the emulator working

glibc-2.9-3.i386
libX11-1.1.4-6.fc10.i386
gdbm-1.8.0-29.fc10.i386
libao-0.8.8-5.fc10.i386
libXau-1.0.4-1.fc10.i386
alsa-lib-1.0.18-6.rc3.fc10.i386
alsa-plugins-pulseaudio-1.0.18-1.rc3.fc10.i386
libXcursor-1.1.9-3.fc10.i386
libgcc-4.3.2-7.i386
libXdmcp-1.0.2-6.fc10.i386
libXext-1.0.4-1.fc9.i386
libICE-1.0.4-4.fc10.i386
e2fsprogs-libs-1.41.3-2.fc10.i386
libselinux-2.0.73-1.fc10.i386
audiofile-0.2.6-9.fc10.i386
libstdc++-4.3.2-7.i386
libxcb-1.1.91-5.fc10.i386
libXrender-0.9.4-3.fc9.i386
libasyncns-0.7-1.fc10.i386
libSM-1.1.0-2.fc10.i386
glib2-2.18.3-2.fc10.i386
esound-libs-0.2.41-1.fc10.i386
gpg-pubkey-4ebfc273-48b5dbf3
zlib-1.2.3-18.fc9.i386
libXrandr-1.2.3-1.fc10.i386
pulseaudio-libs-0.9.13-6.fc10.i386
libXfixes-4.0.3-4.fc10.i386
ncurses-libs-5.6-20.20080927.fc10.i386
libcap-2.10-2.fc10.i386
gamin-0.1.9-6.fc10.i386

This might be more than the minimum. I just used strace and installed
everything it tried to open :-)

To get the eclipse integration working you will need:

tomcat5-jasper-eclipse-5.5.27-6.1.fc10.noarch
eclipse-swt-3.4.1-5.fc10.x86_64
icu4j-eclipse-3.8.1-4.fc10.x86_64
eclipse-jdt-3.4.1-5.fc10.x86_64
eclipse-demos-0.0.1-2.fc8.noarch
eclipse-gef-3.4.1-1.fc10.x86_64
eclipse-ecj-3.4.1-5.fc10.x86_64
eclipse-platform-3.4.1-5.fc10.x86_64
eclipse-rcp-3.4.1-5.fc10.x86_64

After installing this packages the android integration should just work.

Cheers,
Rafael

--~--~---------~--~----~------------~-------~--~----~

3. Bug, voicemail setting reset at boot

4. natvie code try/catch statement support or not

5. Adding a GridView to a TableRow.

6. Usage of ArrayAdapter leads me to Index Array out of Bounds Exception

7. When will star the Android Developer Challenge II ?