Monday, August 13, 2012

latest android sdk bug plus httpd


emulator in r20 segfaulting on a headless box without opengl.

the simple node based http static server to use:
https://github.com/nodeapps/http-server

to not have to use sudo anymore (on my laptop) to install node modules via npm globally (-g flag):

sudo chown -R username:group /usr/local/bin/
sudo chown -R username:group /usr/local/lib/



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

Thursday, June 21, 2012

More Bash magic

set to automatically cd into a dir by typing its name:
shopt -s autocd

go back to previous pwd ($OLDPWD):
cd -

rename a path with a new suffix:
mv /var/www/test{,1}

Again all courtesy of my co-worker Ben.M

Tuesday, June 19, 2012

Android SDK Ant bugs

BEWARE: if you are using r15 of the Android SDK and building with a custom Ant post-build target then this bug might bite you! r17 through to r19 is confirmed as working ok.

Monday, June 11, 2012

Ubuntu UI Annoyances

If you find ubuntu new "on hover" osx-envy scrollbars as frustrating and annoying as I do you want to do:

sudo apt-get remove liboverlay-scrollbar*

(thanks to co-worker Ben M. for this super handy tip).