如何在Android环境中运行groovy?
我正在尝试用Android运行groovy程序。我使用:如何在Android环境中运行groovy?,android,groovy,Android,Groovy,我正在尝试用Android运行groovy程序。我使用: new GroovyShell(aBinding).evaluate(code) 要运行程序,其中code是Groovy代码。当我使用code作为运行此程序时: println "Hello" 我得到的错误是: can't load this type of class file 08-16 09:10:48.502 31488-31488/com.groovy.console W/System.err﹕ org.codehaus
new GroovyShell(aBinding).evaluate(code)
要运行程序,其中code
是Groovy代码。当我使用code
作为运行此程序时:
println "Hello"
我得到的错误是:
can't load this type of class file
08-16 09:10:48.502 31488-31488/com.groovy.console W/System.err﹕ org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
08-16 09:10:48.502 31488-31488/com.groovy.console W/System.err﹕ General error during class generation: can't load this type of class file
08-16 09:10:48.503 31488-31488/com.groovy.console W/System.err﹕ [ 08-16 09:10:48.503 31488:0x7b00 W/System.err ]
java.lang.UnsupportedOperationException: can't load this type of class file
08-16 09:10:48.503 31488-31488/com.groovy.console W/System.err﹕ at java.lang.VMClassLoader.defineClass(Native Method)
08-16 09:10:48.503 31488-31488/com.groovy.console W/System.err﹕ at java.lang.ClassLoader.defineClass(ClassLoader.java:292)
我在哪里犯错
提前感谢。在Android上执行之前,需要将编译脚本的字节码转换为DEX字节码 grooidshell实现正是这样做的:
您正在使用grooid groovy库吗?是的,我在用那个库。我在哪里出错?这是groovy插件中的一个bug吗?