默认情况下,ACRA 仅填充两个字段,基本上是内存转储和堆栈跟踪。 我试图让 ACRA 返回 APP_VERSION、ANDROID_VERSION、PHONE_MODEL 等字段,但在最新版本的 ACRA 中我找不到 ReportField。* 下面是文档中显示的内容,但它不是为我编译的。
import static ReportField.*;
@ReportsCrashes(formKey = "xxxxxxxxxxxxxxxx",
customReportContent = { APP_VERSION, ANDROID_VERSION, PHONE_MODEL, CUSTOM_DATA, STACK_TRACE, LOGCAT },
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text
public class MyApplication extends Application {
最佳答案
org.acra.ReportField 确实存在于 acra jar 文件中。然而在 Android 4.0 中,JDK 1.6
线路:
导入静态 ReportField.*;不编译。
应该是:
import static org.acra.ReportField.*;
关于android - ACRA 报告字段 - 无法添加更多报告字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11194830/