Skip to content Skip to sidebar Skip to footer

Android Rhino Error Can't Load This Type Of Class File

I'm using Rhino in android to execute JavaScript function code in Android(java) and get the result from this code, but I got this exception 01-22 11:33:57.063: E/AndroidRuntime(2

Solution 1:

I had the same problem and I have found a solution here: Problems using Rhino on Android

By default, rhino will try do optimization by generating JVM bytecode on the fly. Android doesn't run JVM bytecode byt Dalvik bytecode. That is why you have to disable optimization:

context.setOptimizationLevel(-1);

Best regards

Post a Comment for "Android Rhino Error Can't Load This Type Of Class File"