Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ACRA 允许您在应用程序被破坏时发送报告。如何在必要的时候使用它来发送报告?例如,在块中:
try { // some code } catch (Exception e) { // send custom report with exception stack trace }
初始化 ACRA:
ACRA.init(this); ErrorReporter.getInstance().addReportSender(new CustomReportSender());
尝试使用以下内容:
try { // some code } catch (Exception e) { ErrorReporter.getInstance().handleException(e); }