Saturday 30 October 2010

nbandroid deprecated error

Recently I purchased the HTC Desire. I am very very very pleased with it!
As with all users of smartphones, I immediately went to the App Market to check out the various apps around. Since I am a foobar2000 user, I found this neat app to remotely control the music playback. Sadly, the app miserably failed.
I've checked another one, but the English of the author is appalling. Yes, I know, I can just get the source, fix it and send it back, but its too much trouble when...

I can do it myself!

It's been a long while since I coded for myself (since I program for a living) so I opened a repo in BitBucket and started my own MusicRemote application (http://bitbucket.org/silverclaw/musicremote).

I fired up Netbeans (I dislike Eclipse) and got the nbandroid plugin to allow development of android applications.
Sadly, the newest SDK for the Android has deprecated some tool and the program fails to build. Took me some muckering around to find how to fix it. Well, its the 3rd commit of my repo!

Apparently, the xml build script is outdated. To fix it, one only has to insert a single line:

arg value="-d"

(between < and > of course. Can't put them here because it breaks the post)

where the apkbuilder tool is configured, line 489 of "build-impl.xml" on the "nbproject" folder. Add it just above the line where the -z option is configured.

This should allow your run process to finish. Keep in mind that, at least on my computer, I need to first start the emulator and then opt to run the app on the already running emulator.

No comments:

Post a Comment