Safeargs library doesnt generate direction class

前端 未结 19 928
孤街浪徒
孤街浪徒 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:14

    We can fix this issue by adding the below codes in gradle and rebuilding the app. In the project gradle add below code.

    classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0"
    

    In app gradle add below code

    apply plugin: "androidx.navigation.safeargs"
    

提交回复
热议问题