Android Bugsense



我在项目中集成了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(); 
        }

它显示给我{"数据":[],"错误":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}

有人能帮我吗?

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

请务必将添加到您的清单中

<uses-permission android:name="android.permission.READ_LOGS" />

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

相关内容

  • 没有找到相关文章

最新更新