Search code examples
androidandroid-architecture-components

SafeArgs are not generating the needed actionclass


I am building a basic app. When i press a button i want to navigate to a new fragment and that fragment should have a number of items in it. According to the documentation, Gradle should generate an inner class in my MainFragmentDirections.class, which should represent the various actions this destination has, but Gradle does not do that. Everything else works fine, so i have implemented the dependencies and plugins corretly


Solution

  • Try to Clean Project then Rebuild Project. I have sometimes the same problem when I add SafeArgs, this tips works for me