I use navigation library and safeargs for passing data. I define argument to fragment like that.
If you already added the dependencies > classpath and apply plugin but changes aren't applied, be sure to Clean and Built the project in order changes are applied.
dependencies > classpath
apply plugin
Clean
Built
In Android Studio:
Build tab > Clean project
Build tab > ReBuild project