7


I am very new to andengine, trying to use this andengine examples from git url : https://github.com/nicolasgramlich/AndEngineExamples
But it always shows me error on two classes

BoundCameraExample and in HullAlgorithmExample

In bound camera example error is in line 220 says :

Type mismatch: cannot convert from void to AnimatedSprite

final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager()).animate(100);

and in HullAlgorithmExample error is on import statement of DrawMode
error shows on line number 11 : import org.andengine.entity.primitive.vbo.DrawMode;
and in lines 168 , 175 says DrawMode cannot be resolved to a variable

I am using java compiler 1.6 for all extensions I downloaded andengine and extensions from the same git repo. What is going wrong with this please help me

Thanks to allll

Siddharth
  • 9,349
  • 16
  • 86
  • 148
Renjith K N
  • 2,613
  • 2
  • 31
  • 53

2 Answers2

32

In the BoundCameraExample, try

final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion,  this.getVertexBufferObjectManager());
face.animate(100);

instead of

final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion,  this.getVertexBufferObjectManager()).animate(100);

In the HullAlgorithExample, import

import org.andengine.entity.primitive.DrawMode;

instead of

import org.andengine.entity.primitive.vbo.DrawMode;
Swati Rawat
  • 1,729
  • 1
  • 19
  • 34
  • 1
    im also facing same problem and i read total threads related to this issue but you made very easier. Its working – Ravikumar11 May 10 '13 at 05:07
11

In 2014 the answer of @swati-rawat is still heplful. I found further two issues, I'll report here the solution since this question is well ranked:

in SplitScreenExample, as in BoundCameraExample, replace with:

final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager());
face.animate(100);

in TextBreakExample replace with:

this.mText = new Text(50, 40, this.mFont, "", 1000, new TextOptions(AutoWrap.LETTERS, AUTOWRAP_WIDTH, HorizontalAlign.CENTER, Text.LEADING_DEFAULT), vertexBufferObjectManager);
donnadulcinea
  • 1,854
  • 2
  • 25
  • 37