开发者

Android game causing phone to lock up

开发者 https://www.devze.com 2023-02-25 05:35 出处:网络
So I\'m creating a game for this game competition at my college. I am extending a surfaceview and basically just moving drawables around on a screen. I recently just changed some pictures to a more up

So I'm creating a game for this game competition at my college. I am extending a surfaceview and basically just moving drawables around on a screen. I recently just changed some pictures to a more updated picture. Now when I press the home button (or the back button) my phone w开发者_JAVA百科ill completely lock up and I will have to pull my battery out to restart it.

I have also tested this with other phones and their phones will lock up. Is there anything that could cause this to happen?


Are you getting messages about ANRs in the log? If so, try this: execute the command (on your computer) adb pull /data/anr/traces.txt -- this will contain stack traces for anything running when the system reported the ANR. From here, you can examine the stack traces of your program, and hopefully find the place where things are getting stuck and freezing everything.

If there's nothing in /data/tanr/traces.txt, you can try the command adb bugreport which will return just about every piece of information it can (including stack traces for all running processes).

These traces are helpful when you get into a frozen state such as this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号