I use navigation library and safeargs for passing data. I define argument to fragment like that.
In my case, the problem was that I was using the same fragment with the same id in 2 navigation graphs.
Android Studio didn’t recognize the actions of one of the navigation graphs.
So the solution for me was to change the id of one of the navigation graphs, rebuild, change again the id and rebuild again.
After that everything worked again