Monday, July 9, 2012

Android Http NPEs

Lovely...
Search google for a NPE from Androids Http package:
libcore.net.http.HttpConnection$Address.hashCode NPE

leads to bug report, which leads to another which finally points me to looking at my url closely and realising I typoed the protocol scheme. As the comment I left suggests, life would have been much clearer with a slightly more specific exception the a null pointer. Sigh.



Sunday, July 1, 2012

Android Emulator keyboard

Well this was a little time waster today:

Turns out that Android SDK r20  now defaults the hw.keyboard property to no.
This means that you will all of a sudden find that after upgrading to r20, keyboard entry (both physical and onscreen) will stop working in both existing and new AVDs.

So you need to set the property explicitly in each AVD config via the GUI or in:

.android/avd/MY_AVD_NAME.avd/config.ini