【发布时间】:2012-08-03 19:59:10
【问题描述】:
有
-keep class com.actionbarsherlock.** { *; }
在我的 proguard 配置中。正如 Actionbarsherlock 家伙所建议的(请参阅 http://actionbarsherlock.com/faq.html)。 但只有在添加之后
-keep public class * extends com.actionbarsherlock.app.SherlockFragment
保留了扩展 SherlockFragment 的类,因此我可以使用 Fragments。
为什么?
【问题讨论】:
-
我很好奇,您是否已将您的 SDK 工具更新到至少 r20?自今年 6 月以来,他们应该在 xml safe with proguard (developer.android.com/tools/sdk/tools-notes.html) 中使用自定义视图:
"Added automatic ProGuard support for the aapt -G flag. This change causes the build system to generate a temporary ProGuard keep-rules file containing classes that are referenced from XML files (such as custom views) and pass this to ProGuard at shrink-time."
标签: java android obfuscation actionbarsherlock proguard