Trying to run simple monkeyrunner python script, 'importerror no module named os'

青春壹個敷衍的年華 提交于 2019-12-01 11:10:32

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.

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.

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.

I resolved this issue with java 1.7.0_21.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!