AndEngine #1 – Getting Started!

First: Download Library here

Next: Extract the archive and find “andengine.jar“. Add this Library file to your android project, If you don’t know how to add a JAR, watch the video below:

Waiting for the gradle is built successfully.

Next: On your mainActivity, extends “BaseGameActivity” and delete all method. Just like below:


public class MainActivity extends BaseGameActivity {
private static final int CAMERA_WIDTH = 480; // the width of the screen
private static final int CAMERA_HEIGHT = 800; // height

// initialize
public Engine onLoadEngine() {
final Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
final EngineOptions engineOptions = new EngineOptions(
true, EngineOptions.ScreenOrientation.PORTRAIT, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera
return new Engine(engineOptions);

// where we load resource (sound, images...)
public void onLoadResources() {


// start a scene
public Scene onLoadScene() {
this.mEngine.registerUpdateHandler(new FPSLogger());
final Scene scene = new Scene(2);
scene.setBackground(new ColorBackground(0, 0, 1));
return scene;

public void onLoadComplete() {



Finally: Run it!

A blue screen appeared? ALL OK !