Saturday, May 25, 2013

monkeyrunner: ImportError: No module named re

If you have recently upgraded to Android SDK Tools Rev. 22 you may have sadly discovered that monkeyrunner is broken because the wrong jython library was included in the build.
This is not due to the upgrade to jython 2.5.3 but to an incorrect library used, that is jython instead of jython-standalone.

It seems that the move to a gradle based build system is causing some trouble. Fortunately, it has been fixed already by which is now merged, so by the time Android SDK Tools Rev. 22.0.1 is out the problem would be in the rear-view mirror.

In the meantime, you can apply this simple workaround:

  1. Download jython-standalone-2.5.3.jar
  2. Save /tools/lib/jython-2.5.3.jar as jython-2.5.3.jar.ORI (just in case you need it)
  3. Symlink (or copy, if your OS does not support symlinks ;-) jython-standalone-2.5.3.jar to jython-2.5.3.jar
After applying these simple steps monkeyrunner, androidviewclient, dump and culebra will work as before.

Friday, May 17, 2013

AndroidViewClient documentation

AndroidViewClient documentation has been updated and now covers most of the public classes and method.

The documentation is generated by epydoc, which also generates some UML class diagrams.

The objective of this documentation is to allow script development without having to have AndroidViewClient sources open.