question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hilt - PreferenceFragmentCompat Support

See original GitHub issue

Is 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:open
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
consp1racycommented, Jul 7, 2021

I ran into the same thing in Dagger Android. Changing the AndroidX Preference dependency from implementation to api fixed it.

Dagger in app module needs to see PreferenceFragmentCompat, so it needs to be exposed from the library module.

2reactions
anthonymonoricommented, Feb 7, 2021

@rhlmshr

If you have a deeply modularized project, then you should consider enabling enableExperimentalClasspathAggregation: https://dagger.dev/hilt/gradle-setup#classpath-aggregation

I 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found