Skip to content Skip to sidebar Skip to footer

Compilation Error After Upgrading From Acra 4.5 To Acra 4.6

I upgraded the ACRA library used by my application from 4.5.0 to 4.6.0 but I am getting a compilation error for formKey which used to work with 4.5. Here is the declaration: @Repo

Solution 1:

After checking the ACRA ChangeLog , it seems to be bug of ACRA in 4.6.0

PR#233 PR#235 Allowing the location of BuildConfig to be configurable to support Gradle build flavours. NB This is a breaking change IF your are capturing BuildConfig AND your Application class does not reside in the Java package defined in your original AndroidManifest manifest:package attribute. In that scenario you will need to explicitly configure 'buildConfigClass' in your ACRA config.

I just upgraded the dependecies to 4.6.2 and the error was gone. You also need to remove the formKey from the annotation declaration.

dependencies {
  compile 'ch.acra:acra:4.6.2'
}


@ReportsCrashes(
  formUri = "",
  socketTimeout = 10000,
  httpMethod = org.acra.sender.HttpSender.Method.POST,
  mode = ReportingInteractionMode.SILENT,
  resDialogText = R.string.crash_dialog_text,
  resDialogIcon = android.R.drawable.ic_dialog_info,
  resDialogTitle = R.string.crash_dialog_title,
  resDialogCommentPrompt = R.string.crash_dialog_comment_prompt,
)

Post a Comment for "Compilation Error After Upgrading From Acra 4.5 To Acra 4.6"