每当我尝试使用playn-jbox2D作为依赖项编译我的PlayN项目时,我只会在HTML上出现以下错误,其余的结果还不错
[INFO] [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
[INFO] at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:140)
[INFO] at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:71)
[INFO] at com.google.gwt.dev.jjs.impl.BuildTypeMap.getType(BuildTypeMap.java:730)
[INFO] at com.google.gwt.dev.jjs.impl.BuildTypeMap.createField(BuildTypeMap.java:570)
[INFO] at com.google.gwt.dev.jjs.impl.BuildTypeMap.access$300(BuildTypeMap.java:99)
[INFO] at com.google.gwt.dev.jjs.impl.BuildTypeMap$BuildDeclMapVisitor.visit(BuildTypeMap.java:180)
[INFO] at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.traverse(FieldDeclaration.java:285)
[INFO] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1343)
[INFO] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1223)
[INFO] at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDec laration.java:687)
[INFO] at com.google.gwt.dev.jjs.impl.BuildTypeMap.createPeersForNonTypeDecls(BuildTypeMap.java:637)
[INFO] at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:514)
[INFO] at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:523)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:599 )
[INFO] at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[INFO] [ERROR] <no source info>: public class org.jbox2d.dynamics.Body
[INFO] extends java.lang.Object
[INFO] /* fields */
[INFO] public static final [unresolved] int e_islandFlag
[INFO] public static final [unresolved] int e_awakeFlag
[INFO] public static final [unresolved] int e_autoSleepFlag
[INFO] public static final [unresolved] int e_bulletFlag
[INFO] public static final [unresolved] int e_fixedRotationFlag
[INFO] public static final [unresolved] int e_activeFlag
[INFO] public static final [unresolved] int e_toiFlag
[INFO] public [unresolved] Unresolved type org.jbox2d.dynamics.BodyType m_type
[INFO] public [unresolved] int m_flags
[INFO] public [unresolved] int m_islandIndex
[INFO] public final [unresolved] Unresolved type org.jbox2d.common.Transform m_xf
[INFO] public final [unresolved] Unresolved type org.jbox2d.common.Sweep m_sweep
[INFO] public final [unresolved] org.jbox2d.common.Vec2 m_linearVelocity
[INFO] public [unresolved] float m_angularVelocity
[INFO] public final [unresolved] org.jbox2d.common.Vec2 m_force
[INFO] public [unresolved] float m_torque
[INFO] public [unresolved] Unresolved type org.jbox2d.dynamics.World m_world
[INFO] public [unresolved] org.jbox2d.dynamics.Body m_prev
[INFO] public [unresolved] org.jbox2d.dynamics.Body m_next
[INFO] public [unresolved] Unresolved type org.jbox2d.dynamics.Fixture m_fixtureList
[INFO] public [unresolved] int m_fixtureCount
[INFO] public [unresolved] Unresolved type org.jbox2d.dynamics.joints.JointEdge m_jointList
[INFO] public [unresolved] Unresolved type org.jbox2d.dynamics.contacts.ContactEdge m_contactList
[INFO] public [unresolved] float m_mass
[INFO] public [unresolved] float m_invMass
[INFO] public [unresolved] float m_I
[INFO] public [unresolved] float m_invI
[INFO] public [unresolved] float m_linearDamping
[INFO] public [unresolved] float m_angularDamping
[INFO] public [unresolved] float m_sleepTime
[INFO] public [unresolved] java.lang.Object m_userData
[INFO] private final [unresolved] Unresolved type org.jbox2d.dynamics.FixtureDef fixDef
[INFO] private final [unresolved] Unresolved type org.jbox2d.collision.shapes.MassData pmd
[INFO] private final [unresolved] Unresolved type org.jbox2d.common.Transform pxf
[INFO] static final [unresolved] boolean $assertionsDisabled
[INFO] /* methods */
[INFO] [unresolved] public void <init>(Unresolved type org.jbox2d.dynamics.BodyDef, Unresolved type org.jbox2d.dynamics.World)
[INFO] [unresolved] protected final void advance(float)
[INFO] [unresolved] public void applyAngularImpulse(float)
[INFO] [unresolved] public final void applyForce(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void applyLinearImpulse(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void applyTorque(float)
[INFO] public final org.jbox2d.dynamics.Fixture createFixture(org.jbox2d.dynamics.FixtureDef)
[INFO] [unresolved] public final Unresolved type org.jbox2d.dynamics.Fixture createFixture(Unresolved type org.jbox2d.collision.shapes.Shape, float)
[INFO] [unresolved] public final void destroyFixture(Unresolved type org.jbox2d.dynamics.Fixture)
[INFO] [unresolved] public final float getAngle()
[INFO] [unresolved] public final float getAngularDamping()
[INFO] [unresolved] public final float getAngularVelocity()
[INFO] [unresolved] public final Unresolved type org.jbox2d.dynamics.contacts.ContactEdge getContactList()
[INFO] [unresolved] public final Unresolved type org.jbox2d.dynamics.Fixture getFixtureList()
[INFO] [unresolved] public final float getInertia()
[INFO] [unresolved] public final Unresolved type org.jbox2d.dynamics.joints.JointEdge getJointList()
[INFO] [unresolved] public final float getLinearDamping()
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getLinearVelocity()
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getLinearVelocityFromLocalPoint(org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void getLinearVelocityFromLocalPointToOut(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getLinearVelocityFromWorldPoint(org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void getLinearVelocityFromWorldPointToOut(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getLocalCenter()
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getLocalPoint(org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void getLocalPointToOut(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getLocalVector(org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void getLocalVectorToOut(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
[INFO] [unresolved] public final float getMass()
[INFO] [unresolved] public final void getMassData(Unresolved type org.jbox2d.collision.shapes.MassData)
[INFO] [unresolved] public final org.jbox2d.dynamics.Body getNext()
[INFO] public final org.jbox2d.common.Vec2 getPosition()
[INFO] [unresolved] public final Unresolved type org.jbox2d.common.Transform getTransform()
[INFO] [unresolved] public Unresolved type org.jbox2d.dynamics.BodyType getType()
[INFO] [unresolved] public final java.lang.Object getUserData()
[INFO] [unresolved] public final Unresolved type org.jbox2d.dynamics.World getWorld()
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getWorldCenter()
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getWorldPoint(org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void getWorldPointToOut(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
[INFO] [unresolved] public final org.jbox2d.common.Vec2 getWorldVector(org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void getWorldVectorToOut(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
[INFO] [unresolved] public boolean isActive()
[INFO] [unresolved] public boolean isAwake()
[INFO] [unresolved] public final boolean isBullet()
[INFO] [unresolved] public boolean isFixedRotation()
[INFO] [unresolved] public boolean isSleepingAllowed()
[INFO] [unresolved] public final void resetMassData()
[INFO] [unresolved] public void setActive(boolean)
[INFO] [unresolved] public final void setAngularDamping(float)
[INFO] [unresolved] public final void setAngularVelocity(float)
[INFO] [unresolved] public void setAwake(boolean)
[INFO] [unresolved] public final void setBullet(boolean)
[INFO] [unresolved] public void setFixedRotation(boolean)
[INFO] [unresolved] public final void setLinearDamping(float)
[INFO] [unresolved] public final void setLinearVelocity(org.jbox2d.common.Vec2)
[INFO] [unresolved] public final void setMassData(Unresolved type org.jbox2d.collision.shapes.MassData)
[INFO] [unresolved] public void setSleepingAllowed(boolean)
[INFO] public final void setTransform(org.jbox2d.common.Vec2, float)
[INFO] [unresolved] public void setType(Unresolved type org.jbox2d.dynamics.BodyType)
[INFO] [unresolved] public final void setUserData(java.lang.Object)
[INFO] [unresolved] public boolean shouldCollide(org.jbox2d.dynamics.Body)
[INFO] [unresolved] protected final void synchronizeFixtures()
[INFO] [unresolved] public final void synchronizeTransform()
[INFO]
[INFO]
[INFO]
[INFO] org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
[INFO] [ERROR] at SpikeJumper.java(29): Body bdy;
[INFO] org.eclipse.jdt.internal.compiler.ast.FieldDeclaration
有谁知道造成这种情况的原因,我找不到任何帮助/
答案 0 :(得分:4)
我发现问题是将cryn-box2D添加到核心pom,我需要单独添加
<inherits name="org.jbox2d.GwtBox2D" />
到ProjectName.gwt.xml