google-developer-training / first-android-app

Repository for Build Your First Android App codelabs (Java and Kotlin)
7 stars 6 forks source link

First Android App codelab: #235

Open samsaradog opened 1 year ago

samsaradog commented 1 year ago

In 9. Task: Implement the second fragment in Step 5: Enable SafeArgs the only way I could get it to work was to put all the changes in the build.gradle Module file:

buildscript {
    repositories {
        google()
    }
    dependencies {
        def nav_version = "2.5.3"
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
    }
}

plugins {
    id 'com.android.application'
    id 'androidx.navigation.safeargs' version '2.5.3'
}

The clue to check the developers guide for SafeArgs was helpful, but it would have saved a lot of time and frustration had the guide been correct in the first place. How long has it been since you showed this to someone at Google who has never seen it before and watched what happens?

Hope this helps.