Proguard error when exporting signed app using android.support.v4.app honeycomb compatibility package

强颜欢笑 提交于 2019-11-28 05:32:21

This is what I'm using in my proguard.cfg:

-dontwarn **CompatHoneycomb
-keep public class * extends android.support.v4.app.Fragment

More general is:

-dontwarn **CompatHoneycomb
-keep class android.support.v4.** { *; }

But it'll cause a larger APK size so only use if the first one isn't working.

It looks like some clases in android.support.v4 are not quite compatible with some classes in android. If you're sure this is not a problem, you can specify

-dontwarn android.support.v4.**

ProGuard will then ignore these problems and continue processing the code.

See the ProGuard manual > Troubleshooting > Warning: can't find referenced field/method

You should set the android:targetSdkVersion to an SDK >= honeycomb.

For information I am using this one

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="13"/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!