30 lines
786 B
Prolog
30 lines
786 B
Prolog
# Flutter ProGuard Rules
|
|
# 2026-04-11 | ProGuard Rules | 解决 release 包白屏问题
|
|
|
|
# Flutter 引擎相关
|
|
-keep class io.flutter.app.** { *; }
|
|
-keep class io.flutter.plugin.** { *; }
|
|
-keep class io.flutter.util.** { *; }
|
|
-keep class io.flutter.view.** { *; }
|
|
-keep class io.flutter.** { *; }
|
|
-keep class io.flutter.plugins.** { *; }
|
|
|
|
# Flutter 嵌入相关
|
|
-keep class io.flutter.embedding.** { *; }
|
|
|
|
# 保持 Flutter 生成的类
|
|
-keep class androidx.lifecycle.** { *; }
|
|
|
|
# 保持反射调用的类
|
|
-keepattributes *Annotation*
|
|
-keepattributes Signature
|
|
-keepattributes InnerClasses
|
|
|
|
# 保持泛型信息
|
|
-keepclassmembers,allowobfuscation class * {
|
|
@com.google.gson.annotations.SerializedName <fields>;
|
|
}
|
|
|
|
# 避免 R8 完全模式问题
|
|
-dontwarn io.flutter.embedding.**
|