I'm trying to set up my SettingsFragment using PreferenceFragmentCompat but android studio give an error that Can't resolve symbol PreferenceFragmentCompat ... I'm using android studio 3.6.2
In your app's build.gradle
make sure you have the corect dependency:
implementation 'androidx.preference:preference:1.1.0'
Then in your SettingsFragment
import the library
Kotlin:
class SettingsFragment : PreferenceFragmentCompat() { }
Java:
public class SettingsFragment extends PreferenceFragmentCompat { }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With