在构建启用R8的发行版apk时,我遇到了下面的错误:
Task :app:minifyReleaseWithR8
AGPBI: {"kind":"warning","text":"Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in C:\\Users\\y509118\\AndroidStudioProjects\\SafeBox\\app\\build\\outputs\\mapping\\release\\missing_rules.txt.\n","sources":[{}]}
AGPBI: {"kind":"warning","text":"Missing class com.google.errorprone.annotations.Immutable (referenced from: com.google.crypto.tink.KeyTemplate and 4 other contexts)","sources":[{}],"tool":"R8"}
Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in C:\Users\y509118\AndroidStudioProjects\SafeBox\app\build\outputs\mapping\release\missing_rules.txt.
Missing class com.google.errorprone.annotations.Immutable (referenced from: com.google.crypto.tink.KeyTemplate and 4 other contexts)上述missing_rules文件的内容:
# Please add these rules to your existing keep rules in order to suppress warnings.
# This is generated automatically by the Android Gradle plugin.-dontwarn com.google.errorprone.annotations.Immutable我应该在支持保护规则中添加-dontwarn或者添加一些-keep规则吗?
发布于 2022-02-18 03:20:51
当涉及到单个文件(而不是整个包)时,最好保持和不丢弃任何警告。这对你的生活并没有多大帮助。
-keep class com.google.errorprone.annotations.Immutablehttps://stackoverflow.com/questions/69242193
复制相似问题