I have the android emulator/SDK installed on my computer, and I\'m trying to run a simple python script, but it fails on the \'import os\' line (which should be standard!)
The solution of this problem (and the problem itself explained) can be found at http://dtmilano.blogspot.ca/2013/05/monkeyrunner-importerror-no-module.html.
Basically, you have to replace jython-2.5.3.jar
by jython-standalone-2.5.3.jar
, at least until Android SDK Tools Rev. 22.0.1 is out.
all by itself in the jython interpreter
If you're using the jython packaged with the Android SDK, it doesn't include an 'os' module by default. You'll need to grab one, and put it in there, or use another interpreter.
The issue is that the latest versions of the Android SDK include jython-2.5.3 which do not have the os and other importable libraries built in. I found an old copy of the SDK and used the old JAR which appears to have that embedded in it those libraries.
I resolved this issue with java 1.7.0_21.