Hilt - PreferenceFragmentCompat Support
See original GitHub issueIs PreferenceFragmentCompat
compatible with hilt 2.29.1-alpha? I’m getting compilation errors when I annotate my own Fragment
that inherits PreferenceFragmentCompat
with @AndroidEntryPoint
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
PreferenceFragmentCompat - Android Developers
As a convenience, this fragment implements a click listener for any preference in the current hierarchy, see onPreferenceTreeClick . Sample Code.
Read more >Using Dagger2 with PreferenceFragmentCompat
I am working on Dependency Injection in my app using Dagger2 . I have a Settings screen built using PreferenceFragmentCompat . But since...
Read more >Developers - Hilt - PreferenceFragmentCompat Support -
Hilt - PreferenceFragmentCompat Support. Google. 11 November 2020 Posted by epool. Is PreferenceFragmentCompat compatible with hilt 2.29.1-alpha?
Read more >Class androidx.preference.PreferenceFragmentCompat
androidx.health.platform.client.service ... androidx.hilt.lifecycle · androidx.hilt.work ... PreferenceFragmentCompat android.support.v7.preference.
Read more >PreferenceFragmentCompat.java - Google Git
{@sample frameworks/support/samples/SupportPreferenceDemos/src/main/java/com/example/androidx/preference/Preferences.java preferences}. *. * @see Preference.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into the same thing in Dagger Android. Changing the AndroidX Preference dependency from
implementation
toapi
fixed it.Dagger in app module needs to see
PreferenceFragmentCompat
, so it needs to be exposed from the library module.@rhlmshr
If you have a deeply modularized project, then you should consider enabling
enableExperimentalClasspathAggregation
: https://dagger.dev/hilt/gradle-setup#classpath-aggregationI had the following stacktrace showing up, and I was using
PreferenceFragmentCompat
in a multi-module setup.The above has mitigated the issue for the time being.