我收到以下返回的错误消息:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script3.groovy: 1: unable to resolve class groovy.json.JsonSlurpe @ line 1, column 1. import groovy.json.JsonSlurpe ^
org.codehaus.groovy.syntax.SyntaxException: unable to resolve class groovy.json.JsonSlurpe @ line 1, column 1. at
org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:149) at
org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1225) at
org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:178) at
org.codehaus.groovy.control.CompilationUnit$11.call(CompilationUnit.java:651) at
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931) at
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593) at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:542) at
3条答案
按热度按时间olhwl3o21#
试着把第一行改一下。小小的错别字。
发件人:
收件人:
ukxgm1gy2#
你的第一句台词应该是这样的...
导入net.sf.json.groovy.jsonslurper
这对我很有效。
5gfr0r5j3#
确保类路径上有
groovy.json
,例如dependent on或