如何找到该堆栈跟踪? [英] How to find this stack trace?
问题描述
我的程序总是崩溃,但logcat中没有显示任何异常。我刚收到以下消息,再加上大量的统计数据有关CPU使用率。显然,我使用了太多的CPU,但我不知道我的计划的一部分是这样做的。哪里是以下文件?我找不到它。
12-30 23:13:06.639:信息/ dalvikvm(7688):写堆栈跟踪 /data/anr/traces.txt
ADB壳
- >
猫/data/anr/traces.txt
编辑:
您需要有root权限来修改/数据的文件/你应该能够访问该文件与像<一个一个应用程序href="https://market.android.com/details?id=com.estrongs.android.pop">https://market.android.com/details?id=com.estrongs.android.pop
一旦你有一个应用程序,打开它 - >菜单 - >设置 - >主目录(变动从 / SD卡/
到 /
) - >退出应用程序 - >再次打开它
那么,你应该能够浏览到/数据/ ANR / *
EDIT2(附加信息的基础上,评论)与已发布的应用程序使用的手在测试后:
-
大多数开发人员依靠开发者控制台错误报告看堆栈跟踪和错误日志当用户提交错误报告。
-
其他impliment自己,或使用一个库如 ACRA
被警告,因为它用来查阅敏感日志数据允许一些用户没有安装一个应用程序,只需。
My program keeps crashing, but the logcat does not show any exceptions. I just get the following message, plus a lot of stats about CPU usage. Clearly I'm using too much of the CPU, but I don't know what part of my program is doing this. Where is the following file? I can't find it.
12-30 23:13:06.639: INFO/dalvikvm(7688): Wrote stack trace to '/data/anr/traces.txt'
adb shell
-->
cat /data/anr/traces.txt
EDIT:
You need to have root access to modify the files in /data/ you should be able to access the file with an app like https://market.android.com/details?id=com.estrongs.android.pop
Once you have that app, open it --> Menu --> Settings --> Home Directory (Change from /sdcard/
to /
) --> Exit the app --> Open it again
Then you should be able to browse to /data/anr/*
EDIT2 (Additional info, based on comments) for use with a published app after hands on testing:
Most developers rely on the developer console error reporting to see the stacktrace and error logs when a user submits an error report.
Others impliment their own or use a library like ACRA
Be warned some users do not install an app simply because it uses the permission to read sensitive log data.
这篇关于如何找到该堆栈跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!