我正在测试Jython for Android取自这里http://code.google.com/p/jython-for-android/
不幸的是我在发布期间遇到了问题...我尝试在我的一个项目中导入所有库,并在方法onCreate of my activity中输入以下代码:
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.exec("print 'hello from Jython!' ");
Run Code Online (Sandbox Code Playgroud)
这段代码应该可以工作(就像在标准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)
Run Code Online (Sandbox Code Playgroud)
我还从repo下载了最后一个版本,但没有任何变化...我将构建目标设置为2.1update ...
可能是什么?任何人都有这个lib的经验吗?
提前谢谢^^
干杯
| 归档时间: |
|
| 查看次数: |
4177 次 |
| 最近记录: |