ACRA / acra

Application Crash Reports for Android
https://www.acra.ch
Apache License 2.0
6.32k stars 1.13k forks source link

invokedynamic requires --min-sdk-version >= 26 #645

Closed potatoru closed 6 years ago

potatoru commented 6 years ago

Not an issue at all, but after upgrade from Acra 4, I've got these errors.

Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Alexander\.gradle\caches\transforms-1\files-1.1\acra-core-5.1.1.aar\6df76559d2a73aee2fbf8bfe5f554c49\jars\classes.jar
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing org/acra/data/CrashReportDataFactory.class
Error:com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Alexander\.gradle\caches\transforms-1\files-1.1\acra-core-5.1.1.aar\6df76559d2a73aee2fbf8bfe5f554c49\jars\classes.jar

Solved for me by adding these lines into build.gradle file

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

Maybe add it to documentation or FAQ?

F43nd1r commented 6 years ago

There is a note on the Changelog page, but I'll check where it fits (or you can do it yourself, anyone can edit the wiki).

dzboot02 commented 6 years ago

Put in

android {
      //
      compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
      }
}
F43nd1r commented 6 years ago

Now mentioned in the BasicSetup