Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vishalbandre/964aa717f1d592c22e37fecf52bbcafe to your computer and use it in GitHub Desktop.
Save vishalbandre/964aa717f1d592c22e37fecf52bbcafe to your computer and use it in GitHub Desktop.
You need to make to updates in your code:
1) You need to add this dependency in project level build.gradle:
// Add this
buildscript {
dependencies {
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0")
}
}
// Existing
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
}
2. And, inside app level build.gradle add this:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
// Add this plugin
id 'androidx.navigation.safeargs.kotlin'
}
And, after this please clean and rebuild your Android Project. This shall solve the issue of "not generating ***FragmentDirections" classes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment