We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f84839b commit 04509d3Copy full SHA for 04509d3
1 file changed
app/proguard-rules.pro
@@ -448,8 +448,14 @@
448
449
# ============ Keep all Activities and Fragments ============
450
451
--keep class com.shuyu.github.kotlin.module.** extends android.app.Activity { *; }
452
--keep class com.shuyu.github.kotlin.module.** extends androidx.fragment.app.Fragment { *; }
+# ARouter 通过路由表里的全限定类名字符串反射加载 Activity / Fragment,
+# 必须保留 module 包下所有类的「类名」(成员仍允许混淆/优化),否则启动时
453
+# Postcard.navigation 会因 Class.forName 失败抛 "Init provider failed"。
454
+-keep class com.shuyu.github.kotlin.module.** { *; }
455
+-keepnames class com.shuyu.github.kotlin.module.**
456
+
457
+# 所有 ARouter 注解的目标类(额外保险,保证 @Route 标注的 class 不被裁剪)
458
+-keep @com.alibaba.android.arouter.facade.annotation.Route class * { *; }
459
460
# ============ Kotlin Serialization (if used) ============
461
0 commit comments