Skip to content

Building release app with skip-keychain raises error: "Missing classes detected while running R8" for com.google.errorprone.annotations.Immutable #3

Description

@marcprux

The following error will occur when building an app that depends on skip-keychain in release mode (e.g., using fastlane assemble from the Android/ folder):

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /opt/src/github/skiptools/skipapp-notes/.build/Android/app/outputs/mapping/release/missing_rules.txt.
ERROR: R8: Missing class com.google.errorprone.annotations.Immutable (referenced from: com.google.crypto.tink.KeyTemplate and 11 other contexts)

> Task :app:minifyReleaseWithR8 FAILED
w: Detected multiple Kotlin daemon sessions at 
[Incubating] Problems report is available at: file:///opt/src/github/skiptools/skipapp-notes/.build/Android/skip.notes/reports/problems/problems-report.html

This is reported at tink-crypto/tink-java#7. The recommended workaround to add the following rules to the Android/app/proguard-rules.pro file seems to work:

-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
-dontwarn com.google.errorprone.annotations.Immutable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions