“AndroidRuntime:关闭虚拟机"没有别的 [英] "AndroidRuntime: Shutting down VM" with nothing else

查看:46
本文介绍了“AndroidRuntime:关闭虚拟机"没有别的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,LogCat 不再报告崩溃时的任何堆栈跟踪.相反,我只得到以下信息:

For some reason, LogCat doesn't report any stack traces anymore on crashes. Instead, I only get the following info:

D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40dd3960)

这真的很奇怪,因为我已经在同一个项目上工作了三个月,直到最近(两三天前)堆栈跟踪才停止显示.什么可能导致这种情况?我怎样才能让它再次显示堆栈跟踪?

This is really weird because I've been working on the very same project for three months, and only recently (two, three days ago) the stack traces stopped showing. What could cause this? How can I get it to show stack traces again?

推荐答案

我遇到了同样的问题.将 Google Analytics 升级到版本 7(或 7.3,我不记得了)后,我的应用程序总是在遇到错误时关闭而没有任何 logcat 消息.

I experienced the same problem. After upgrading Google Analytics to version 7 (or 7.3, I do not remember), my app always closes without any logcat messages when encountering an error.

事实证明,如果我同时启用自定义捕获所有异常处理程序 (Thread#setUncaughtExceptionHandler) 和 Google Analytics 中的报告崩溃功能,就会发生这种情况.

It turns out that it happens if I enable both a custom catch-all-exception handler (Thread#setUncaughtExceptionHandler) and the report crash feature in Google Analytics.

当我禁用其中之一时,logcat 会再次显示堆栈跟踪.

When I disable one of them, the logcat displays the stack trace again.

这篇关于“AndroidRuntime:关闭虚拟机"没有别的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆