Question

I was following this tutorial and I keep getting an error. Here is the offending line of code:

this.mTexture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);

I get the error

Cannot instantiate the type Texture

Everything is imported correctly, but I keep getting the error.

Any Ideas?

Thanks!!

Was it helpful?

Solution

This guide is old. Texture class is abstract now, so you can not instantiate objects of it.

Use one of its subclasses - BitmapTextureAtlas for example.

I don't recommend you to continue with this guide, unless it gets updated. I had a short look and I saw a bit out-of-date stuff. There are many up-to-date tutorials in the AndEngine forums, you can try them out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top