我正在测试从
http://code.google.com/p/jython-for-android/开始的Android的Jython
不幸的是我在发布期间遇到了问题……我试图导入
我的一个项目和onCreate方法中的所有库
我的活动我把这个代码:
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.exec("print 'hello from Jython!' ");
这段代码应该可以工作(就像在标准java中一样),但是我得到了这个:
Traceback (innermost last):
(no code object) at line 0
java.lang.NullPointerException
at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:104)
at org.python.core.Py.compile_flags(Py.java:1685)
at org.python.core.Py.compile_flags(Py.java:1698)
at org.python.core.Py.compile_flags(Py.java:1706)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:135)
at org.python.util.InteractiveConsole.interact(JythonForAndroidTest.java:29)
我还从repo下载了最后一个版本,但没有任何变化……
我将构建目标设置为2.1update …
可能是什么?任何人都有这个lib的经验吗?
提前谢谢^^
干杯