AndEngine 環境配置出錯解決

來源:互聯網
上載者:User

1. 首先下載AndEngine 源碼 和 example和八個擴充,下載後,解壓。2.講10個解壓包匯入到eclipse(會有錯誤),首先,將AndEngine 選擇項目--》 屬性,選擇java compiler,將右側的 compiler compliance level 改為 1.6 。其次,針對AndEngine的八個擴充,同樣安裝上述方法,把compiler compliance level 改為1.6,然後分別匯入剛才編譯好的 AndEngine的jar包。最後,針對example,把compiler compliance level 改為1.6,匯入剛才編譯好的AndEngine的jar包的同時,還要匯入剛才編譯好的八個擴充的jar包。做完以上步驟,仍會有些錯誤:錯誤一:Description Resource Path Location TypeType mismatch: cannot convert from void to AnimatedSprite BoundCameraExample.java /AndEngineExamples/src/org/andengine/examples line 220 Java Problem 解決辦法:[java]  final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager()).animate(100);    改為[java]  final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager());      face.animate(100);    錯誤二:Description Resource Path Location TypeThe constructor TextOptions(AutoWrap, float, float, HorizontalAlign) is undefined TextBreakExample.java /AndEngineExamples/src/org/andengine/examples line 106 Java Problem 解決辦法:[java]  this.mText = new Text(50, 40, this.mFont, "", 1000, new TextOptions(AutoWrap.LETTERS, AUTOWRAP_WIDTH, Text.LEADING_DEFAULT, HorizontalAlign.CENTER), vertexBufferObjectManager);             改為:[java]  this.mText = new Text(50, 40, this.mFont, "", 1000, new TextOptions(AutoWrap.LETTERS, AUTOWRAP_WIDTH,  HorizontalAlign.CENTER, Text.LEADING_DEFAULT), vertexBufferObjectManager);    錯誤三:DrawMode cannot be resolved to a variable 解決辦法: [java]  import org.andengine.entity.primitive.vbo.DrawMode;   改為: [java]  import org.andengine.entity.primitive.DrawMode;     

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.