Saeid
Saeid

Reputation: 2321

Acra not work in Release Version

for reporting my Application Crashes use Acra library via Android Studio Gradle Dependencies in this form :

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

Now in Bebug version it work and return crash report goodly but after export Release version of application not work and return this error in logcat :

Not adding buildConfig to log. Class Not found : " + className + ". Please configure 'buildConfigClass' in your ACRA config 

Then i use acra-4-6-2.jar file instead dependencies but not work still!

Too before saw this link but was not helpful fore me.

With thanks for your attention

Upvotes: 3

Views: 1157

Answers (3)

Cord Rehn
Cord Rehn

Reputation: 1149

None of the other answers actually provided the fix.

To fix this issue, assign your BuildConfig.class to the buildConfigClass field on your ReportsCrashes annotation declaration.

@ReportsCrashes(
    buildConfigClass = BuildConfig.class )
public class YourApplication extends Application { ... }

Upvotes: 1

Ognyan
Ognyan

Reputation: 13600

If you are using so called "dynamic" configuration you are probably having "empty" annotation like @ReportsCrashes().

In that case it turns out that ACRA does not create proper default config. The solution is simple: just add some fake property there like:

@ReportsCrashes(formUri = "placeholder")

which you will later override in the dynamic config...

Upvotes: 0

William
William

Reputation: 20196

It sounds like you are Proguardng your app on release but have not added the relevant ACRA classes to your Proguard config.

See https://github.com/ACRA/acra/wiki/ProGuard

Upvotes: 1

Related Questions