我正尝试从android应用程序发送崩溃报告,它正在打开电子邮件客户端,并在电子邮件正文中输入 com.x.x崩溃报告 。我似乎无法在电子邮件中获取任何其他信息。该文档没有完整的电子邮件示例,我添加了reportContent
(但APP_VERSION无法解决)。我还用 READ_PHONE_STATE
我指的是这个https://github.com/ACRA/acra/wiki/AdvancedUsage#choosing-which-fields-to-be-included-in-reports。
任何帮助将不胜感激
清单
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
应用
@AcraCore(
reportContent = { /*APP_VERSION,*/ ANDROID_VERSION, PHONE_MODEL, CUSTOM_DATA, STACK_TRACE, LOGCAT}
)
@AcraMailSender(mailTo = "X@protonmail.com")
public class MyApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
ACRA.init(this);
}
答案 0 :(得分:0)
按照@ gabe-sechan的建议,我改用了Crashlytics
答案 1 :(得分:0)
我知道这已经死了,但是ACRA网站上有错误,示例应为:
@AcraCore(
buildConfigClass = org.acra.BuildConfig.class,
logcatArguments = {"-t", "200", "-v", "time"},
reportFormat= StringFormat.JSON,
reportContent = {
ReportField.USER_COMMENT,
ReportField.APP_VERSION_NAME,
ReportField.APP_VERSION_CODE,
ReportField.ANDROID_VERSION,
ReportField.PHONE_MODEL,
ReportField.CUSTOM_DATA,
ReportField.STACK_TRACE,
ReportField.LOGCAT }
)
@AcraMailSender(
mailTo = "email@domain.com"
)