[SOLVED] AndEngine Examples Showing error

  ... tutorials on how to use AndEngine.

[SOLVED] AndEngine Examples Showing error

Postby renjithkn » Thu Nov 15, 2012 8:02 pm

Hi all ,

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
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager()).animate(100);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


and in HullAlgorithmExample error is in 3 places including import statements related to 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
renjithkn
 
Posts: 17
Joined: Thu Nov 15, 2012 7:41 pm

Re: AndEnine Examples Showing error

Postby alex » Mon Nov 19, 2012 12:48 am

I reproduced this just now. It seems the solution is:

At the top of HullAlgorithmExample.java, replace :

import org.andengine.entity.primitive.vbo.DrawMode;


with

import org.andengine.entity.primitive.DrawMode;



Next problem: TextBreakExample.java, line 106 should read:

this.mText = new Text(50, 40, this.mFont, "", 1000, new TextOptions(AutoWrap.LETTERS, AUTOWRAP_WIDTH, HorizontalAlign.CENTER, Text.LEADING_DEFAULT), vertexBufferObjectManager);



Next problem: BoundCameraExample.java, line 220 should read:

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


Next problem: SplitScreenExample.java, line 179 should read:

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



why do the examples have these basic bugs ?
alex
 
Posts: 275
Joined: Thu Jul 01, 2010 8:21 pm

Thank you Alex

Postby renjithkn » Mon Nov 19, 2012 5:20 pm

Thank you Alex ..Thanks for the reply, Recently I sorted out this problem..
Same as you I am also wondering Why these Basic errors occurred in the examples...
renjithkn
 
Posts: 17
Joined: Thu Nov 15, 2012 7:41 pm

Re: Thank you Alex

Postby OzLark » Tue Nov 20, 2012 12:07 am

renjithkn wrote:Thank you Alex ..Thanks for the reply, Recently I sorted out this problem..
Same as you I am also wondering Why these Basic errors occurred in the examples...


Nicholas is very busy with many projects and he has neglected to update the examples.

If you (or anyone) wants, they can fix them all up and make a pull request to Nicholas. I'd do it myself, but I'm already over committed.
Did this post help you? Feel free to return the gesture by downloading Ninja Bees, creating a level (or more) and sharing it to the Ninja Bees website!

Ninja Bees - Our latest Android game, check it out on Google Play (free) or paid with no ads
OzLark
 
Posts: 1130
Joined: Sun Feb 05, 2012 3:19 am

Re: [SOLVED] AndEnine Examples Showing error

Postby Ted Hughes » Thu Dec 27, 2012 12:10 am

Thank you!
Ted Hughes
 
Posts: 63
Joined: Fri Oct 15, 2010 3:23 pm


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 15 guests