appmattus/certificatetransparency

Missing classes detected while running R8 with AGP > 8

Closed this issue · 3 comments

Trying to compile the project getting the following error:

Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /.../.../build/outputs/mapping/.../missing_rules.txt.
Missing class java.lang.invoke.StringConcatFactory (referenced from: void CertificateTransparencyLogger.log(java.lang.String, com.appmattus.certificatetransparency.VerificationResult) and 12 other contexts)

Related to Kotlin/kotlinx.serialization#2145? Looks like I should be able to tweak the compiler options with the following when building the library to prevent this:

freeCompilerArgs = listOf("-Xstring-concat=inline")

I think part of the reason why I hadn't seen this before is the apps I'm using the library in personally are built with Java 11. I assume yours is built with Java 8 currently?

As an added note according to https://issuetracker.google.com/issues/250197571#comment29 if the Android project uses desugaring then you also shouldn't see this exception. See https://developer.android.com/studio/write/java8-support#library-desugaring