Hardcoded App:fragment String In Preference Crashes In Release
Below is the simplified version of the xml file for my settings screen.
Solution 1:
The aapt2 generated proguard rules for preferences specifically look for the android:fragment attribute, not app:fragment. You'd want to use android:fragment to automatically keep preference fragments.
Solution 2:
I added these lines into my proguard-rules.pro and it stopped crashing.
-keep publicclass * extends androidx.preference.Preference
-keep publicclass * extends androidx.preference.PreferenceFragmentCompat
Post a Comment for "Hardcoded App:fragment String In Preference Crashes In Release"