1

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"

Sorel
  • 91
  • 6
  • Hello, please update your post on how you are actually writing your fragment with actions in your navigation xml. Note that you always have to build before using your Directions class as those classes are autogenerated for you – Lucho May 07 '20 at 10:49
  • @Lucho - rebuild many times – Sorel May 07 '20 at 10:50
  • Then update your post on how your writing your navigation xml and what dependencies you are using – Lucho May 07 '20 at 10:51

1 Answers1

1

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

misskbar
  • 11
  • 1