【问题标题】:Logcat uncaught Exception details not appearing on actual device but emulatorsLogcat 未捕获的异常详细信息未出现在实际设备上,但出现在模拟器上
【发布时间】:2015-07-03 13:16:53
【问题描述】:
    W/dalvikvm﹕threadid=1: thread exiting with uncaught exception (group=0x41823da0)
    I/dalvikvm﹕ threadid=3: reacting to signal 3 07-03 14:54:48.967
    I/dalvikvm﹕ Wrote stack traces to '/data/anr/traces.txt' 
       ---> Exception details missing here

我最近注意到,当我正在开发的应用程序崩溃时,如果在实际设备上运行(在 Galaxy S3-Android 和 4.3 和 Galaxy S5-Androdid 4.4 上测试),logcat 不会显示异常详细信息,但如果我重现在 android 模拟器上崩溃,可以使用完整的异常堆栈跟踪。

我正在使用 Android Studio 1.3、Platform-tools 22、Build-tools 22.0.1

您是否遇到过类似的问题?你解决了吗?

谢谢。

【问题讨论】:

  • 您是否在您的设备上启用了 USB 调试?
  • @JorgeCasariego 当然,它们已启用,我可以看到我自己的日志,只是缺少例外
  • 像魅力一样工作!谢谢!!
  • 我会像一个答案一样发布:D 你使用谷歌分析吗?

标签: android android-studio android-logcat uncaught-exception


【解决方案1】:

如果您使用的是 Google Analytics,请删除 build.gradle 文件中的所有依赖项,因为 Google Analytics 会跟踪所有异常。

在您的代码中删除 tracker.enableExceptionReporting(true)

原始答案来自here

【讨论】:

  • 我需要分析,所以我只是注释掉了 tracker.enableExceptionReporting(true)
猜你喜欢
  • 2011-04-12
  • 1970-01-01
  • 2021-04-17
  • 2023-03-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多