-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unable to instantiate fragment, could not find Fragment constructor #1
Comments
Okay, I found the actual problem. It has nothing to do with constructor injecting my fragments, but with my base class |
EditYour FragmentFactory has one big flaw: If one wants to inject dependencies that need a fragment instance, it is not possible, because you are installing your |
Okay, here is the final fix for the problem and the correct way to instantiate all objects: FragmentFactoryModule
NavHostModule
FragmentFactoryProviderModule
Fragment Factory
NavHostFragment
|
Hello sir, I tried to implement your "improved fragmentfactory" as you had shown here.
The problem I have is, that I get the following error:
Here are my fragments:
DocumentFragment
When I delete my dependencies from my fragment-constructor, everything works fine. Does that mean, that we are not able to constructor inject with your "improved" method??
The text was updated successfully, but these errors were encountered: