3

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

Community
  • 1
  • 1
Saeid
  • 2,261
  • 4
  • 27
  • 59

3 Answers3

1

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

William
  • 20,150
  • 8
  • 49
  • 91
1

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 { ... }
Cord Rehn
  • 1,119
  • 14
  • 22
0

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...

Ognyan
  • 13,452
  • 5
  • 64
  • 82