Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/208.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android ACRA报告字段-Can';不要添加更多的报告字段_Android_Acra - Fatal编程技术网

Android ACRA报告字段-Can';不要添加更多的报告字段

Android ACRA报告字段-Can';不要添加更多的报告字段,android,acra,Android,Acra,默认情况下,ACRA只填充两个字段,基本上是内存转储和堆栈跟踪。 我正试图让ACRA返回诸如APP_VERSION、ANDROID_VERSION、PHONE_MODEL等字段,但在最新版本的ACRA中,我找不到ReportField。*以下是文档中显示的内容,但不是为我编译的 import static ReportField.*; @ReportsCrashes(formKey = "xxxxxxxxxxxxxxxx", customReportContent =

默认情况下,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文件中。但是在安卓4.0中,JDK1.6

该行:

导入静态报告字段。*;不编译

应该是:

 import static org.acra.ReportField.*; 

org.acra.ReportField确实存在于acra jar文件中。但是在安卓4.0中,JDK1.6

该行:

导入静态报告字段。*;不编译

应该是:

 import static org.acra.ReportField.*; 

这是acra版本4.4.0中的所有字段 但是记住!!90%来自confg acra的ERRO都在谷歌文档表单上

试试这个:

import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.annotation.ReportsCrashes;

import android.app.Application;
import android.content.Context;

@ReportsCrashes(formKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", customReportContent = {ReportField.APP_VERSION_CODE, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA,
        ReportField.STACK_TRACE, ReportField.LOGCAT, ReportField.AVAILABLE_MEM_SIZE, ReportField.REPORT_ID, ReportField.APPLICATION_LOG, ReportField.PACKAGE_NAME, ReportField.FILE_PATH,
        ReportField.BUILD, ReportField.BRAND, ReportField.PRODUCT, ReportField.TOTAL_MEM_SIZE, ReportField.INITIAL_CONFIGURATION, ReportField.CRASH_CONFIGURATION, ReportField.DISPLAY,
        ReportField.USER_COMMENT, ReportField.USER_APP_START_DATE, ReportField.USER_CRASH_DATE, ReportField.DUMPSYS_MEMINFO, ReportField.EVENTSLOG, ReportField.RADIOLOG, ReportField.IS_SILENT,
        ReportField.DEVICE_ID, ReportField.INSTALLATION_ID, ReportField.DEVICE_FEATURES, ReportField.ENVIRONMENT, ReportField.SETTINGS_SYSTEM, ReportField.SETTINGS_SECURE,
        ReportField.SHARED_PREFERENCES, ReportField.MEDIA_CODEC_LIST, ReportField.THREAD_DETAILS})
public class XYZApplication extends Application {
    public void onCreate() {
        ACRA.init(this);
        super.onCreate();
    }
}

这是acra版本4.4.0中的所有字段 但是记住!!90%来自confg acra的ERRO都在谷歌文档表单上

试试这个:

import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.annotation.ReportsCrashes;

import android.app.Application;
import android.content.Context;

@ReportsCrashes(formKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", customReportContent = {ReportField.APP_VERSION_CODE, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA,
        ReportField.STACK_TRACE, ReportField.LOGCAT, ReportField.AVAILABLE_MEM_SIZE, ReportField.REPORT_ID, ReportField.APPLICATION_LOG, ReportField.PACKAGE_NAME, ReportField.FILE_PATH,
        ReportField.BUILD, ReportField.BRAND, ReportField.PRODUCT, ReportField.TOTAL_MEM_SIZE, ReportField.INITIAL_CONFIGURATION, ReportField.CRASH_CONFIGURATION, ReportField.DISPLAY,
        ReportField.USER_COMMENT, ReportField.USER_APP_START_DATE, ReportField.USER_CRASH_DATE, ReportField.DUMPSYS_MEMINFO, ReportField.EVENTSLOG, ReportField.RADIOLOG, ReportField.IS_SILENT,
        ReportField.DEVICE_ID, ReportField.INSTALLATION_ID, ReportField.DEVICE_FEATURES, ReportField.ENVIRONMENT, ReportField.SETTINGS_SYSTEM, ReportField.SETTINGS_SECURE,
        ReportField.SHARED_PREFERENCES, ReportField.MEDIA_CODEC_LIST, ReportField.THREAD_DETAILS})
public class XYZApplication extends Application {
    public void onCreate() {
        ACRA.init(this);
        super.onCreate();
    }
}