运行 GWT 2.7 在 DevMode 期间的奇怪错误

Strange error during running GWT 2.7 in DevMode

怎么了?

我对此进行了一些讨论,但没有解决方案 https://plus.googleapis.com/communities/116543000751323604177/stream/1cf77106-8055-472e-abb2-ac58a512b663

09:43:36.128 [ERROR] [MyApplication] Exception initializing module
java.lang.IllegalArgumentException: null
    at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
    at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
    at com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor.<init>(BytecodeSignatureMaker.java:59)
    at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
    at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
    at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:166)
    at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:42)
    at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:37)
    at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:114)
    at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:366)
    at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:580)
    at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513)
    at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499)
    at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668)
    at com.google.gwt.dev.DevModeBase$UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:101)

可能是因为类路径中的 ASM 版本不兼容。 GWT 需要 ASM 5+

类路径可能有一些配置错误。就我而言,我有一个运行良好的 2.8 项目,但较新的项目由于某种原因出现了堆栈竞争。我不知道是什么原因造成的,但我的解决方案是更改 .classpath 的这一部分:

    <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER/App Engine"/>
    <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>

至:

   <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
   <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER/GWT"/>