ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in build/app/outputs/mapping/release/missing_rules.txt.
ERROR: R8: Missing class com.google.errorprone.annotations.CanIgnoreReturnValue (referenced from: com.google.crypto.tink.KeysetManager com.google.crypto.tink.KeysetManager.add(com.google.crypto.tink.KeyTemplate) and 52 other contexts)
Missing class com.google.errorprone.annotations.CheckReturnValue (referenced from: com.google.crypto.tink.InsecureSecretKeyAccess and 1 other context)
Missing class com.google.errorprone.annotations.Immutable (referenced from: com.google.crypto.tink.InsecureSecretKeyAccess and 40 other contexts)
Missing class com.google.errorprone.annotations.RestrictedApi (referenced from: com.google.crypto.tink.aead.AesEaxKey$Builder com.google.crypto.tink.aead.AesEaxKey.builder() and 6 other contexts)
Missing class javax.annotation.Nullable (referenced from: java.lang.Object com.google.crypto.tink.PrimitiveSet$Entry.fullPrimitive and 86 other contexts)
Missing class javax.annotation.concurrent.GuardedBy (referenced from: com.google.crypto.tink.proto.Keyset$Builder com.google.crypto.tink.KeysetManager.keysetBuilder and 3 other contexts)
特徴として、デバッグインストールは問題がない。
Proguard関連のようです。
しかしながら、先週まではエラーなど出ずGooglePlayConsoleへアップロードできていました。
多分ですが、AndroidStudioをアップグレードし、色々なものが暗黙的に変わったのが原因かと思います。
対策(すでにProguardを設定済として記述)
このエラーで作成されたファイル、
build/app/outputs/mapping/release/missing_rules.txt
を開く。(VSCodeだと開きっぱなしにすることがポイント)
android/app/proguard-rules.pro が存在しなかったら手で作成し、上述の「missing_rules.txt」の内容を追加し再度
flutter build appbundle –release
を実行し、「missing_rules.txt」ファイルがなくなるまで、ここでの作業を繰り返す。
※ エラーが続く限り「missing_rules.txt」は不足分が更新されますのでVSCodeで開きっぱなしにするとコピペが楽です。
AndroidStudio LadyBug 問題ありすぎですやんか・・・。
投稿者プロフィール
最新の投稿
Laravel2025年4月11日XServer Lalavelのタスクスケジューラー
ぼやき2025年4月11日Google Search Console セキュリティの問題
Git2025年4月3日GithubActionsでのSSH系エラー
Git2025年3月21日git コマンド集