Archive for March, 2011

Hello everyone.  Sometimes you will see a Dalvik failed to convert error 2. What is happening is that one Eclipse IDE ini file JVM setting in combination with using JVMs from Oracle 1.6.21 or later causes this conflict.

The work around is to remove -XX:+AggressiveOpts from your ini file JVM settings.


Agile Android with a Vengence

Posted: March 26, 2011 in Android, Java

What you see above is a screenshot of MonkeyRecorder which is part of MonkeyRunner and unlike a different tool can be scripted in the IDE you use using python. The switch to some agile processes does not mean that you can suddenly complete a complex application in two weeks because some non-programmer says they need it in two weeks.

However, under the right conditions you can fast iterate prototypes in under 2 weeks. Thus, now I am on the final push to integrate MonkeyRunner in my Wabash dev tool. The difference between running a test suite with mocked user input and having MonkeyRunner execute tests with user input is that under MonkeyRunner its actual user input and not mocked.


Thus, just imagine that in your application code you log wrap some code that records at the beginning of a method the heap and traces and dumps those analysis onto the sdcard. So you could than have Monekrunner start the emulator and install the application ask for user input and as the last step push the heap and trace analysis files from the sdcard to the project reports folder.

You would think that some firm out there could use an android developer that builds his or her own dev tools. Once again these tools do not speed up the development processed based on a wrong management decision. However, they do speed up prototype iterations when management gets out of the way of the developer.



Posted: March 22, 2011 in Android, Java
Tags: , ,

Here is what the WabashDashboard looks like:

It was kept simple without use of grails-groovy, django, etc as wanted developers to be able to use it on laptops as well as desktops. I just used some effective iframes to make it real damn easy in operation.

The last part of Wabash to add is the ability to execute MonkeyRunner python scripts. Basically Monkeyrunner allows you to install the app and feed mocked user input to app and take screenshots and also install the android test project for the app as well within the same script and run tests.


If you attempt to use the ant scripts in android sdk  you will end up with a blank non-existent emma html report. Apparently you need to change the location of the coverage.em file in the emma report ask as its not in the test project folder.

I now the iphone dev tools are worse but damn it do we need to invent an effing Android drinking game to make the effing point, here?  Any time the supplied ant scripts in the andorid sdk are wrong take  a drink.

Okay, now that is fixed I need to add emma reports to the TDD/jvm tests in Wabash.

Wabash Progress

Posted: March 19, 2011 in Android, Java
Tags: ,

Most of the feature set is in including support for webkit projects, Native C, etc so that you can use an ant buildscript set with most of the stuff already in place. The last step is the dashboard and I have some interesting choices.

I could choose Groovy Jetty, Grails, RoR, TurboGears, Django, Symfony, etc. But at this point since I will be making use of Android SDK monkeyrunner which is in python, it makes sense to go with a python base such as Django or TurboGears. Than if I virtualenv and virtualenv wrap it makes it real damn easy to keep environments straight while at the same time having the dashboard live a a child project right in the app project directory which means it can serve a double purpose of being the project notes.

Later on I may make a refactoring of the ant stuff into python modules but for right now is very good progress as I will have a 0.0.1 release that only took 7 days of dev time while I was doing other stuff, not bad. For those poking around in Wabash, the Checkstyle, PMD, and config) files are 85% finished and you are welcomed to downloading them and re-purposing them. For beginners wait until I have a good set of instructions.



Posted: March 16, 2011 in Android, Java
Tags: ,

The Wabash Dashboard:

Its not very pretty yet and I have to polish some of the reports but both TDD and BDD within the same build system(Wabash) and even some analysis of javascript in the assets folder. You cannot really go fast agile unless your tools work along-side the development workflow. In my case since I am using Eclipse and Robolectric style tests cannot be run from Eclipse, I needed a build tool that could be run from the command line and allow me to switch from TDD to BDD and back without a lot of manual work in the development process.

Seemed better use of my time than spending time preparing free project prototype estimates to certain Chicago MBA startup idiots(Not that all Chicago MBA and startups are idiots, just the ones attempting to get free work form me). Best part is that due to its adherence to portability, you can use it on a 2-cpu core laptop as I avoid hooking into Maven, Hudson-CI(Jenkins_CI), etc to make sure that I can use it on a laptop anywhere.


PivotalLabs Eclipse IDE instructions for using Robolectric is wrong. It is wrong in that you are not able to run junit tests from the Eclipse IDE as the Eclipse workspace and Eclipse IDE combination will not recognize linked-source individual files and files such as the AndroidManifest are required for robolectric to operate correctly during the junit tests.

I did put up a sample project(Wabash) with the eclipse IDE project layout of App-Parent project and the child JVMTest and child AndroidTestProject with a correct set of ant build scripts. It is left to you to fill-in or add the codeqa reports targets and logic. Also, under Eclipse 3.6 the openfile feature can open junit.xml files on junit view if you are executing a command line command sequence of:


eclipse --launcher.openFile absolute path of file to open

Thus, you can set an exec bash target to execute that after you have the junit tests run and the junit reports generated as if the Eclipse IDE is open that junit view will come up with the junit report.


Node.js on android

Posted: March 13, 2011 in Android, Java

Okay someone did Node.js on android by using root. So who wants to volunteer to do an application-intent app to add node.js to android?

Bug 15366

Posted: March 10, 2011 in Android, Java

If you are wondering how to get the build script in the Android Test Project to reference the parent project classes properly look in this bug report as the ant script code fix is posted in the bug report. It assumes that you have the parent project as root and the android test project as a child project.

IDE Performance Tunning

Posted: March 7, 2011 in Eclipse, Java
Tags: ,

Usually when people refer to IDE performance tunning such s Eclipse they only talk of changing the Eclipse .ini file. If you are lucky to be using Eclipse under Linux there is one more setting that helps. That is change the priority form zero to about negative 5(-5) which tells the Linux OS to give more or higher priority to the Eclipse IDE which in turn results in less time of the IDE being ‘paused’ to about down to zero times it being paused.

I would imagine once you launch the android emulator you can also set its priority to about -5 with the same effects.