ACRA正在崩溃

我正在使用ACRA进行崩溃报告,但突然间它引起了一些问题。 我的应用程序无法启动,我收到了崩溃报告通知,但点击它却什么都不做。 打开logcat,我可以看到以下条目:

 11-20 19:25:53.093: E/ACRA(16233): ACRA caught a RuntimeException exception for com.skipmorrow.phca. Building report.
 11-20 19:25:53.763: D/ApplicationPolicy(716): isStatusBarNotificationAllowed: packageName = com.skipmorrow.phca
 11-20 19:25:53.763: E/ACRA(16233): com.skipmorrow.phca fatal error : Unable to create application com.skipmorrow.phca.ACRA: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
 11-20 19:25:53.763: E/ACRA(16233): java.lang.RuntimeException: Unable to create application com.skipmorrow.phca.ACRA: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
 11-20 19:25:53.763: E/ACRA(16233):     at com.skipmorrow.phca.ACRA.onCreate(ACRA.java:89)

这并不值得继续,但看起来ACRA本身存在问题。

这是我的ACRA实现类:

 package com.skipmorrow.phca;

 import org.acra.annotation.*;
 import org.acra.ReportingInteractionMode;

 import android.app.Application;

 @ReportsCrashes(
 formKey = "dFdSMXh...E6MQ",
 mode = ReportingInteractionMode.NOTIFICATION,
 resNotifTickerText = R.string.crash_notif_ticker_text,
 resNotifTitle = R.string.crash_notif_title,
 resNotifText = R.string.crash_notif_text,
 resNotifIcon = android.R.drawable.stat_notify_error, // optional. default is a warning sign
 resDialogText = R.string.crash_dialog_text,
 resDialogIcon = android.R.drawable.ic_dialog_info, //optional. default is a warning sign
 resDialogTitle = R.string.crash_dialog_title, // optional. default is your application name
 resDialogCommentPrompt = R.string.crash_dialog_comment_prompt, // optional. when defined, adds a user text field input with this text resource as a label
 resDialogOkToast = R.string.crash_dialog_ok_toast, // optional. displays a Toast message when the user accepts to send a report.
 logcatArguments = {
        "-t"
        ,"2000"
        ,"-v"
        ,"time"
        ,"PHCA_ActionCommand:D"
        ,"ActionParameterEditTextActivity:D"
        ,"ActionParameterSeekbarActivity:D"
        ,"PHCA_C2DMReceiver:D"
        ,"PHCA_CommonActivity:D"
        ,"PHCA_ConfigurationActionCommandChooser:D"
        ,"PHCA_ConfigurationAddNewAction:D"
        ,"PHCA_ConfigurationAddNewPage:D"
        ,"PHCA_ConfigurationAddNewPagelink:D"
        ,"PHCA_ConfigurationAddNewPageStatus:D"
        ,"PHCA_ConfigurationEditActionCommand:D"
        ,"PHCA_ConfigurationEditPageRefreshUpdateActivity:D"
        ,"PHCA_ConfigurationEditVariable:D"
        ,"PHCA_ConfigurationEditVariableValueSetting:D"
        ,"PHCA_ConfigurationLandingPage:D"
        ,"PHCA_ConfigurationPageChooserActivity:D"
        ,"PHCA_ConfigurationPageObjectChooserActivity:D"
        ,"PHCA_ConfigurationRefreshUpdateChooserActivity:D"
        ,"PHCA_DBAdapter:D"
        ,"PHCA_DragListener:D"
        ,"PHCA_DragNDropAdapter:D"
        ,"PHCA_DragNDropListView:D"
        ,"PHCA_DropListener:D"
        ,"PHCA_EditC2dmSettingsActivity:D"
        ,"PHCA_EditGlobalPrefsActivity:D"
        ,"PHCA_EnterFilenameForBackup:D"
        ,"PHCA_EnterPinActivity:D"
        ,"PHCA_EnterPinDialog:D"
        ,"PHCA_HttpNetworking:D"
        ,"PHCA_ListLabels:D"
        ,"PHCA_MyListArrayAdapter:D"
        ,"PHCA_Page:D"
        ,"PHCA_PageAction:D"
        ,"PHCA_PageChooserDialog:D"
        ,"PHCA_PageImageActivity:D"
        ,"PHCA_PageLink:D"
        ,"PHCA_PageListActivity:D"
        ,"PHCA_PageRefreshUpdate:D"
        ,"PHCA_PageStatus:D"
        ,"PHCA_PhcaActivity:D"
        ,"PHCA_PhcaAppWidgetConfigurator:D"
        ,"PHCA_PhcaAppWidgetProvider:D"
        ,"PHCA_PhcaMenu:D"
        ,"PHCA_PhcaPrefs:D"
        ,"PHCA_PhcaUtils:D"
        ,"PHCA_RemoveListener:D"
        ,"PHCA_SocketServerNetworking:D"
        ,"PHCA_Variable:D"
        ,"PHCA_VariableChooser:D"
        ,"PHCA_VariableSetting:D"
        ,"PHCA_VariableValueSettingChooser:D"
        ,"PHCA_VisiblePhcaPageObject:D"
        ,"PHCA_WidgetDialogResponseActivity:D"
        ,"PHCA_XmlFileChooser:D"
        ,"PHCA_XmlNodeCounter:D"
        ,"PHCA_XmlParser:D"
        ,"*:S"
        }
 )

 public class ACRA extends Application {
    @Override
     public void onCreate() {
         // The following line triggers the initialization of ACRA
        org.acra.ACRA.init(this); // <<<<====== LINE 89
         super.onCreate();
     }  
 }

另一个线索(我认为)是在我的ACRA类中,在onCreate中,我必须使用完全限定符来调用init

org.acra.ACRA.init(this)

编辑我不敢相信我第一次离开了这个。 这是com.skipmorrow.phca.ACRA中的第89行

在我使用过ACRA的其他项目中,我不需要这样做(实际上,这些指令只是用ACRA.init(this)调用init(),这可能与它有什么关系?


事故不在ACRA内。

它在这个类的第89行com.skipmorrow.phca.ACRA.onCreate(ACRA.java:89)

这不是一个ACRA类。 所有ACRA类都在org.acra包中。 不知道com.skipmorrow.phca.ACRA来自哪里,但你需要看看那里。

链接地址: http://www.djcxy.com/p/66175.html

上一篇: ACRA is crashing

下一篇: Why my bouncing ball passes through the ground?