0

我在我的项目中集成了 bugsense-1.9.jar 并尝试将异常记录到 bugsense。这是我的代码:

try {
           // your code
           int a = 1/0; // this will raise an exception
        } catch (Exception e) {
           BugSenseHandler.log("Divide by zero exception", e);
           //throw new RuntimeException("exception requested by user");
           Log.i("errrr logg:",""+e);
           BugSenseHandler.readLogs(); 
        }

它向我显示 {"data": [], "error": null} 而不是下面显示的错误日志

Looking for exceptions in: /data/data/com.Narolainfotech.MyShortSaleScore/files
07-09 16:59:04.561: D/BugSenseHandler(15399): Found 0 stacktrace(s)
07-09 16:59:04.561: D/BugSenseHandler(15399): Transmitting log data
07-09 16:59:04.571: D/BugSenseHandler(15399): Transmitting stack trace:java.lang.ArithmeticException: divide by zero
07-09 16:59:04.571: D/BugSenseHandler(15399):   at          android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2685)

07-09 16:59:22.781: D/BUGSENSE(15399): {"data": [], "error": null}

谁能帮我?

4

2 回答 2

1

ReadLogs 仅适用于企业计划。你有吗?

请务必添加到您的清单:

<uses-permission android:name="android.permission.READ_LOGS" />
于 2012-07-25T13:18:10.687 回答
0

请记住,READ_LOGS自 Jelly bean 以来,权限仅限于有根设备。

于 2013-01-21T10:34:36.283 回答