Action is not generated in FragmentDirections when Fragment is used in a second nav graph

1k Views Asked by At

FragmentA is used in nav_graph_first and all the respective action methods/navigations are created in FragmentADirections but when FragmentA is used in nav_graph_second additional navigations are not generated in FragmentADirections. Why? Is this a navigation component restriction?

All the actions are created with Navigation Editor.

These are the dependencies implemented in the project:

apply plugin: 'androidx.navigation.safeargs.kotlin'

implementation "androidx.navigation:navigation-fragment-ktx:2.3.0-alpha06"

implementation "androidx.navigation:navigation-ui-ktx:2.3.0-alpha06"

1

There are 1 best solutions below

0
On

Cleaning and building many times didn't work for me. I solved by adding both actions in the nav graphs with @+id now is working