Android运行jython,Jython for Android

I'm testing Jython for Android taken from here http://code.google.com/p/jython-for-android/

Unfortunately I have a problem during the launch... I tried to import

all the libraries in one of my project and in the method onCreate

of my activity I put this code:

PythonInterpreter interpreter = new PythonInterpreter();

interpreter.exec("print 'hello from Jython!' ");

This code should work ( as in the standard java do ) but I get this :

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)

I have also downloaded the last version from the repo, but nothing changes...

I set the build target to 2.1update...

What could be? Anyone has any experience with this lib?

Thanks in advance ^^

Cheers

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值