2012-03-01 50 views
2

當我嘗試運行andengine例子,我得到這個問題:AndEngine與物理PhysicsFactory錯誤

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); 

謝謝

+0

確保您沒有將不同版本的AndEngine和AndEnineExamples鏈接在一起。您是否使用GIT存儲庫中的最新版本? – JohnEye 2012-03-01 15:25:37

回答

2

我有同樣的問題。

解決方案是讓AndEnginePhysicsBox2DExtension-GLES2將AndEngine-GLES2作爲IntelliJ中的模塊依賴項。