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
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;
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With