为V7支持库动作条的Android Proguard的配置 [英] Android Proguard configuration for the v7 Support Library ActionBar
本文介绍了为V7支持库动作条的Android Proguard的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是V7支持库,以上显示一个动作条安卓2.x的它的工作原理不够好,但我不得不让Proguard的后解决了几类/找不到方法的错误。
I'm using the v7 Support Library to show an ActionBar on Android 2.x. It works well enough but I had to fix a few class/method not found errors after enabling Proguard.
是否有任何指引,哪些类必须是preserved?
Are there any guidelines on which classes need to be preserved?
到目前为止,我有以下:
So far I have these:
-keep public class android.support.v7.internal.widget.ActionBarContainer
-keep class android.support.v7.internal.widget.ActionBarView$HomeView
-keep public class android.support.v7.internal.widget.ActionBarContextView
这似乎是现在的工作,但我没有那么确信它不会在某个阶段,因为在某些XML文件中引用一些其他的所谓内部类的崩溃。
It seems to work now but I'm not that confident that it won't crash at some stage because of some other supposedly internal class referenced in some XML file.
推荐答案
我有解决它:
-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
这篇关于为V7支持库动作条的Android Proguard的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文