Gradle Grails 3.3.10中org.codehaus.groovy.runtime.DefaultGroovyMethods的错误

Gradle Grails 3.3.10中org.codehaus.groovy.runtime.DefaultGroovyMethods的错误,gradle,intellij-idea,grails,Gradle,Intellij Idea,Grails,我试图在Intellij中运行grails3.3.10应用程序,但在启动应用程序时出现以下错误,我也使用了grailsclean然后尝试了,但仍然得到相同的错误 APPLICATION FAILED TO START Description: An attempt was made to call the method org.codehaus.groovy.runtime.DefaultGroovyMethods.collect([Ljava/lang/Object;Lgroovy/la

我试图在
Intellij
中运行
grails3.3.10
应用程序,但在启动应用程序时出现以下错误,我也使用了
grailsclean
然后尝试了,但仍然得到相同的错误

APPLICATION FAILED TO START

 Description:

An attempt was made to call the method org.codehaus.groovy.runtime.DefaultGroovyMethods.collect([Ljava/lang/Object;Lgroovy/lang/Closure;)Ljava/util/List; but it does not exist. Its class, org.codehaus.groovy.runtime.DefaultGroovyMethods, is available from the following locations:

    jar:file:/C:/Users/Sherif/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/2.4.17/9a38b95a08a80b90fbff89726f6f7e7d8bac3ac5/groovy-2.4.17.jar!/org/codehaus/groovy/runtime/DefaultGroovyMethods.class

It was loaded from the following location:

    file:/C:/Users/Sherif/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/2.4.17/9a38b95a08a80b90fbff89726f6f7e7d8bac3ac5/groovy-2.4.17.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.codehaus.groovy.runtime.DefaultGroovyMethods
我的环境规格如下:

JAVA:1.8.0.211, 操作系统:Windows 10 64位, 圣杯:3.3.10, IDE:Intellij

如何解决这个错误

这是build.gradle:

buildscript {
    repositories {
        mavenLocal()
        maven { url "https://repo.grails.org/grails/core" }
    }
    dependencies {
       classpath "org.grails:grails-gradle-plugin:$grailsVersion" 
        classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
        classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.15.1"
       //classpath "org.amcworld.plugins:i18n-asset-pipeline:2.0.0"
    }
}

version "0.1"
group "fb3"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"

repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/grails/core" }
    maven { url "https://repo.grails.org/grails/plugins" }
}

dependencies {
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile "org.springframework.boot:spring-boot-autoconfigure"
    compile "org.grails:grails-core"
    compile "org.springframework.boot:spring-boot-starter-actuator"
    compile "org.springframework.boot:spring-boot-starter-tomcat"
    compile "org.grails:grails-web-boot"
    compile "org.grails:grails-logging"
    compile "org.grails:grails-plugin-rest"
    compile "org.grails:grails-plugin-databinding"
    compile "org.grails:grails-plugin-i18n"
    compile "org.grails:grails-plugin-services"
    compile "org.grails:grails-plugin-url-mappings"
    compile "org.grails:grails-plugin-interceptors"
    compile "org.grails.plugins:cache"
    compile "org.grails.plugins:async"
    compile "org.grails.plugins:scaffolding"
    compile "org.grails.plugins:events"
    compile "org.grails.plugins:hibernate5"
    compile "org.hibernate:hibernate-core:5.1.16.Final"
    compile "org.grails.plugins:gsp"
    compile 'org.grails.plugins:mail:2.0.0'
    compile 'org.grails.plugins:quartz:2.0.13'
    compile 'org.grails.plugins:quartz-monitor:1.3'
    compile 'org.grails.plugins:remote-pagination:0.5.0'
    compile "org.grails.plugins:jquery:1.11.1"
    compile "org.grails.plugins:jquery-validation:1.9"
    compile 'org.grails.plugins:spring-security-core:4.0.0.RC2'
    compile 'org.grails.plugins:spring-security-ui:4.0.0.M1'
    compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.11'
    compile "com.stripe:stripe-java:10.11.0"  //7.7.0
    runtime 'com.google.guava:guava:21.0' 
    runtime 'org.grails.plugins:i18n-asset-pipeline:2.0.0'
  console "org.grails:grails-console"
   profile "org.grails.profiles:web"
    runtime "org.glassfish.web:el-impl:2.1.2-b03"
    runtime "com.h2database:h2"
    runtime "org.apache.tomcat:tomcat-jdbc"
    runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.15.1"
    testCompile "org.grails:grails-gorm-testing-support"
    testCompile "org.grails.plugins:geb"
    testCompile "org.grails:grails-web-testing-support"
    testCompile "org.grails.plugins:geb:1.1.2"
    testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
    testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
    testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:2.47.1"
}

bootRun {
    jvmArgs('-Dspring.output.ansi.enabled=always')
    addResources = true
    String springProfilesActive = 'spring.profiles.active'
    systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

tasks.withType(Test) {
    systemProperty "geb.env", System.getProperty('geb.env')
    systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
    systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
    systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
}

assets {
    minifyJs = true
    minifyCss = true
}

我可以通过向build.gradle添加以下依赖项来解决此特定问题:


让我知道这是否有帮助。

grails clean
?也试着从gradle工具窗口运行“重新导入”
grails clean
Reimport
都不起作用,但仍然会出现相同的错误显示
build.gradle
,可能是对错误代码的依赖version@Mär我编辑了主要帖子并添加了它
compile "org.codehaus.groovy:groovy-all:2.4.17"