Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Proguard configuration for the v7 Support Library ActionBar

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.

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 

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.

like image 829
Mirko N. Avatar asked Aug 17 '13 14:08

Mirko N.


People also ask

Which v7 support libraries are used for modifying UI settings?

v7 Preference Support Library The preference package provides APIs to support adding preference objects, such as CheckBoxPreference and ListPreference , for users to modify UI settings. The v7 Preference library adds support for interfaces, such as Preference. OnPreferenceChangeListener and Preference.

Which of the following library supports storage Android?

The AndroidX library contains the existing support library and also includes the latest Jetpack components. You can continue to use the support library. Historical artifacts (those versioned 27 and earlier, and packaged as android. support.


1 Answers

I solved it with:

-dontwarn android.support.v7.** -keep class android.support.v7.** { *; } -keep interface android.support.v7.** { *; } 
like image 168
Ivan Morgillo Avatar answered Sep 23 '22 01:09

Ivan Morgillo