当我尝试运行 andengine 示例时,我遇到了这个问题:
The method createBoxBody(PhysicsWorld, IShape, BodyDef.BodyType, FixtureDef) from the type PhysicsFactory refers to the missing type IShape
在这一行:
PhysicsFactory.createBoxBody(this.mPhysicsWorld, ground, BodyType.StaticBody, wallFixtureDef);
这个错误:
The method registerUpdateHandler(IUpdateHandler) in the type Entity is not applicable for the arguments (PhysicsWorld)
在这一行:
this.mScene.registerUpdateHandler(this.mPhysicsWorld);
谢谢
最佳答案
我也遇到了同样的问题。
解决方案是让 AndEnginePhysicsBox2DExtension-GLES2 将 AndEngine-GLES2 作为 IntelliJ 中的模块依赖项。
关于android - AndEngine 与PhysicsFactory 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9518132/