Safeargs library doesnt generate direction class

前端 未结 19 922
孤街浪徒
孤街浪徒 2021-02-01 11:44

I use navigation library and safeargs for passing data. I define argument to fragment like that.



        
19条回答
  •  日久生厌
    2021-02-01 12:27

    As Christian wrote, adding source set do app gradle file helped. The problem occurs in Android Studio 4.1 and 4.2 for me. In Kotlin DSL:

    android {
        ....
        sourceSets {
            getByName("main").java.srcDirs("build/generated/source/navigation-args")
        }
    }
    

提交回复
热议问题