Problems using Rhino on Android

 ̄綄美尐妖づ 提交于 2019-11-27 20:37:14

I finally got it to work. I should have paid more close attention to that blog post I linked.

If I add the line

cx.setOptimizationLevel(-1);

to disable optimisations, everything works perfectly.

An Android-compatible edition of rhino1_7R2.jar is available on the SL4A site, in the version control system. Here is a sample project that wraps up Rhino and BeanShell into an Android interpreter service.

I've written a library which allows to run Rhino on Android.

Advantages include:

  • Rhino can only run on optimization level -1. The library supports all levels.
  • The library supports the use of JavaAdapter, which is not possible with base Rhino.
  • Altough i did not benchmark this, it should give a performance increase. (Compiled code is faster than interpreted code)

https://github.com/F43nd1r/rhino-android

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