Paste Groovy into Android Android App

Basically, I need to run Groovy Scripts to manage Java objects, and GroovyShell / GroovyScriptEngine is the best way to do this. Can I embed Groovy in a Java application? I tried putting groovy -all-1.8.2.jar in the Android Java App files folder, referencing it and then compiling, but I have a bunch of errors.

How to do it?

+5
source share
6 answers

I do not believe that this will work. Groovy converts scripts to bytecode, and since the Dalvik bytecode is different from the Java bytecode expected by Groovy, I think it will have problems ...

Discobot , , , .

...

+2

09/2011 Discobot, , . : , .

Groovy 2.0 , () , - - @CompileStatic Groovy 2.0. Groovy 2.0.1... 2.0.4, , .

, Groovy, Android , , , (. wiki wiki).

+1
+1

The best choice for running scripts on Android is SnapScript . It does not rely on Bytecode and is fully supported on Android.

0
source

All Articles