java - Android AndEngine GameNot Running -


i new in android gaming , using andengine making android games have made sample using andengine problem when run application on emulator application not run dont know why have enabled gpu emulation on emulator aplpication not working.

i have made .apk file install game in real device still same problem application not run gives error. me solve issue

my code , using android api 2.3.3

package com.game.practice; import org.andengine.engine.camera.camera; import org.andengine.engine.options.engineoptions; import org.andengine.engine.options.screenorientation; import org.andengine.engine.options.resolutionpolicy.ratioresolutionpolicy; import org.andengine.entity.scene.scene; import org.andengine.entity.scene.background.background; import org.andengine.entity.util.fpslogger; import org.andengine.ui.activity.simplebasegameactivity; public class gamepracticeactivity extends simplebasegameactivity { // =========================================================== // constants // =========================================================== static final int camera_width = 480; static final int camera_height = 800; // =========================================================== // fields // =========================================================== private camera mcamera; private scene mmainscene; // =========================================================== // constructors // =========================================================== // =========================================================== // getter & setter // =========================================================== // =========================================================== // methods for/from superclass/interfaces // =========================================================== @override public engineoptions oncreateengineoptions() { this.mcamera = new camera(0, 0, camera_width, camera_height); return new engineoptions(true, screenorientation.portrait_fixed, new ratioresolutionpolicy(camera_width, camera_height), this.mcamera); } @override protected void oncreateresources() { // todo auto-generated method stub } @override protected scene oncreatescene() { this.mengine.registerupdatehandler(new fpslogger()); // logs frame rate /* create scene , set background colour (1, 1, 1) = white */ this.mmainscene = new scene(); this.mmainscene.setbackground(new background(1, 1, 1)); return this.mmainscene; } } 

logcat errors

these errors recieving when run application on emulators

you getting classnotfoundexception. there few reasons ever error:

  1. the class genuinely doesn't exist. if using code official example , getting this, make sure have latest build of library
  2. you have not added andengine jar build path. fix this, right click on jar in eclipse, , build path â–º add build path.
  3. your andengine jar not in /libs folder. happens when have added jar build path, newer versions of adt need in /libs. put there , re-add build path.
  4. make sure have declared class in correct package, , have given corresponding full qualified name in androidmanifest.xml.

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -