Skip to content
F43nd1r edited this page Dec 25, 2017 · 2 revisions

Migrating from ACRA 4 to ACRA 5

  1. Follow the steps in the Setup guide for dependencies and annotations.

  2. Transform your old annotation configuration:

    List of changed annotation options:

    • formUriAcraHttpSender.uri
    • mode: replaced by automatic plugin discovery
    • resDialogPositiveButtonTextAcraDialog.resPositiveButtonText
    • resDialogNegativeButtonTextAcraDialog.resNegativeButtonText
    • resDialogCommentPromptAcraDialog.resCommentPrompt
    • resDialogEmailPromptAcraDialog.resEmailPrompt
    • resDialogIconAcraDialog.resIcon
    • resDialogOkToastAcraCore.resReportSendSuccessToast & AcraCore.resReportSendFailureToast
    • resDialogTextAcraDialog.resText
    • resDialogTitleAcraDialog.resTitle
    • resDialogThemeAcraDialog.resTheme
    • resNotifIconAcraNotification.resIcon
    • resNotifTextAcraNotification.resText
    • resNotifTickerTextAcraNotification.resTickerText
    • resNotifTitleAcraNotification.resTitle
    • resToastTextAcraToast.resText
    • sharedPreferencesMode: Removed, now always Context.MODE_PRIVATE, as the other values should not be used
    • formUriBasicAuthLoginAcraHttpSender.basicAuthLogin
    • formUriBasicAuthPasswordAcraHttpSender.basicAuthPassword
    • customReportContentAcraCore.reportContent
    • mailToAcraMail.mailTo
    • connectionTimeoutAcraHttpSender.connectionTimeout
    • socketTimeoutAcraHttpSender.socketTimeout
    • sendReportsAtShutdown: Previously deprecated, now removed
    • reportDialogClassAcraDialog.reportDialogClass
    • reportPrimerClass: Replaced by ReportingAdministrators, which are loaded by ServiceLoader
    • httpMethodAcraHttpSender.httpMethod
    • reportTypeAcraCore.reportFormat Note: now also supported by EmailSender
    • keyStoreFactoryClassAcraHttpSender.keyStoreFactoryClass
    • certificatePathAcraHttpSender.certificatePath
    • resCertificateAcraHttpSender.resCertificate
    • certificateTypeAcraHttpSender.certificateType
    • reportAsFileAcraMailSender.reportAsFile
    • nonBlockingReadForLogcatAcraCore.logcatReadNonBlocking
  3. Default output for all senders is now JSON. If you do not want this, use

@AcraCore(reportFormat = StringFormat.KEY_VALUE_LIST)
  1. Moved classes:
  • CrashReportDataorg.acra.data.CrashReportData
  • ACRAConfigurationorg.acra.config.CoreConfiguration + Plugin configurations
  1. Maven Directory:

If you were previously using mavenCentral(), add jcenter(), if it isn't already present.