我正在使用 groovy 作为开发语言开发一个 intelliJ 插件。
我的系统默认使用 groovy 2.1.7,但 intelliJ idea 使用 groovy 2.0.6(in lib/
)。
当我开始使用我的插件时,我在加载我的 Groovy 类时遇到了这个异常。
Conflicting module versions. Module [groovy-all is loaded in version 2.1.7 and you are trying to load version 2.0.6
这是顶部回溯。
groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.1.7 and you are trying to load version 2.0.6
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:509)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:78)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:72)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:54)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:110)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:71)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:33)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:162)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:192)
at io.github.tomykaira.accelvoice.ideaplugin.NextInsertionHolder.$getStaticMetaClass(NextInsertionHolder.groovy)
at io.github.tomykaira.accelvoice.ideaplugin.NextInsertionHolder.<init>(NextInsertionHolder.groovy)
at io.github.tomykaira.accelvoice.ideaplugin.AccelVoiceModule.moduleAdded(AccelVoiceModule.java:45)
at com.intellij.openapi.module.impl.ModuleImpl.moduleAdded(ModuleImpl.java:236)
at com.intellij.openapi.module.impl.ModuleManagerImpl$4.run(ModuleManagerImpl.java:535)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1013)
at com.intellij.openapi.module.impl.ModuleManagerImpl.fireModuleAddedInWriteAction(ModuleManagerImpl.java:532)
at com.intellij.openapi.module.impl.ModuleManagerComponent$3$1.run(ModuleManagerComponent.java:139)
at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:169)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:343)