当我尝试在Android Studio gradle项目中启动Groovy Shell时出现错误
Exception in thread "main" java.lang.ClassNotFoundException: org.codehaus.groovy.tools.GroovyStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:115)
我在MacBook Pro上运行Android Studio 0.3.7.
任何想法如何解决?
解决方法:
尝试在您的buildscript类路径依赖项中添加groovy:
buildscript {
dependencies {
...
classpath 'org.codehaus.groovy:groovy-all:1.8.6'
}
}
那为我解决了错误.