zoukankan      html  css  js  c++  java
  • AndEngine 环境配置出错解决

    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 Type
    Type mismatch: cannot convert from void to AnimatedSprite BoundCameraExample.java /AndEngineExamples/src/org/andengine/examples line 220 Java Problem

     

    解决办法:

    [java] view plaincopy
    1. final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager()).animate(100);  


     

    改为

    [java] view plaincopy
    1. final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager());  
    2.   
    3.   
    4. face.animate(100);  


     

    错误二:

    Description Resource Path Location Type
    The constructor TextOptions(AutoWrap, float, float, HorizontalAlign) is undefined TextBreakExample.java /AndEngineExamples/src/org/andengine/examples line 106 Java Problem

     

    解决办法:

    [java] view plaincopy
    1. this.mText = new Text(5040this.mFont, ""1000new TextOptions(AutoWrap.LETTERS, AUTOWRAP_WIDTH, Text.LEADING_DEFAULT, HorizontalAlign.CENTER), vertexBufferObjectManager);  
    2.           

     

    改为:

    [java] view plaincopy
    1. this.mText = new Text(5040this.mFont, ""1000new TextOptions(AutoWrap.LETTERS, AUTOWRAP_WIDTH,  HorizontalAlign.CENTER, Text.LEADING_DEFAULT), vertexBufferObjectManager);  


     错误三:

    DrawMode cannot be resolved to a variable

     

    解决办法:

     

    [java] view plaincopy
    1. import org.andengine.entity.primitive.vbo.DrawMode;  


    改为:

     

    [java] view plaincopy
    1. import org.andengine.entity.primitive.DrawMode;  


     

     

  • 相关阅读:
    uva 12034 Race
    计算机基础之计算机硬件软件数据结构
    Project Perfect让Swift在server端跑起来-Perfect in Visual Studio Code (四)
    关于自己定义转场动画,我都告诉你。
    Shell编程入门
    CODEVS 1029 遍历问题
    【VBA研究】工作表自己主动筛选模式检測
    卸载MySQL 5.0
    操作系统(二)进程控制
    前端面试题
  • 原文地址:https://www.cnblogs.com/jackrex/p/3001338.html
Copyright © 2011-2022 走看看