Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation issue with Jetpack Navigation and Dagger.Hilt 2.34 #2533

Closed
lukas1 opened this issue Apr 8, 2021 · 2 comments
Closed

Animation issue with Jetpack Navigation and Dagger.Hilt 2.34 #2533

lukas1 opened this issue Apr 8, 2021 · 2 comments

Comments

@lukas1
Copy link

lukas1 commented Apr 8, 2021

Latest release of Dagger.Hilt 2.34 has introduced a bug that manifests itself during navigation.

I have created a simple project that reproduces the issue, here: https://github.com/lukas1/Hilt-Navigation-Issue/tree/master

If you change in the project the version of Dagger.Hilt to 2.33, the animation behaves as expected.

Expected animation:
Correct Behaviour of Dagger.Hilt 2.33

Actual animation:
Incorrect Behaviour of Dagger.Hilt 2.34

@danysantiago
Copy link
Member

This is not related to Hilt but to its androidx.fragment dependency. Hilt has been trying to keep up with the bug fixes in Fragment's new state manager and is currently depending on version 1.3.2 and its likely upgrading your fragment dependency which is likely the culprit of the issue.

If you remove the Hilt dependency out of your sample project and depend on Fragment 1.3.2 you'll observe the same issue. I recommend you file a bug to the Navigation folks here, they also work on Fragments.

As a workaround you can exclude androidx.fragment from Hilt's transitive deps via Gradle, with something like this:

implementation ("com.google.dagger:hilt-android:2.34-beta") {
    exclude group: 'androidx.fragment'
}

@lukas1
Copy link
Author

lukas1 commented Apr 9, 2021

Thank you, indeed your observation is correct. Therefore I'm closing this issue and will report it as advised to maintainers of navigation library.

@lukas1 lukas1 closed this as completed Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants