0

So I am trying to follow a tutorial on creating an Android game in Java. The Tutorial was written for Gingerbread 2.3 but from what I have read there shouldn't be much of a coding difference. The problem comes with I run the application via the provided SDK emulators; in 2.3.3 it runs fine, but in 4.0.3 it tosses several errors and the event logging doesn't respond. I like the tutorial it is good and thorough that is why I would like to use it though it is fairly outdated. My min api is set at 8 (tutorial runs api 8) and the target at 15. Before I get into posting my code as I don't know where it could be going wrong, some of the errors that seem funky to me in the logcat are:

Note all are with pid 94

ActivityManager   | no content found for permission revoke: file...
WindowManager     | failed to take screenshot for (120x180) to layer 21005
NetworkManagement | setKernelCountSet(10040, 1) failed with errno -2
NetworkManagement | setKernelCountSet(10013, 0) failed with errno -2

The screen displays as it should, I am just not getting any response from the TAG log and no events are being processed. Also, in my code I should hit this:

@Override
public void run() {
    long tickCount = 0L;
    Log.d(TAG, "Starting game loop");
    while (running) {
        tickCount++;
        // update game state 
        // render state to the screen
    }
    Log.d(TAG, "Game loop executed " + tickCount + " times");
}

but I never do. I do in 2.3.3 but not the 4.0.3 version.

Zach Caudle
  • 145
  • 2
  • 13

1 Answers1

0
  • Delete the emulator and start a new one.
  • Delete emulator data and wipe user data and restart it.
  • If above does not work, try deleting dalvik cache by:
adb root
adb remount
adb shell rm -r /data/dalvik-cache/*

commands in command line.

Erol
  • 6,478
  • 5
  • 41
  • 55