IllegalArgumentException: navigation destination xxx is unknown to this NavController

后端 未结 30 2392
遇见更好的自我
遇见更好的自我 2020-11-27 11:28

I am having issue with the new Android Navigation Architecture component when I try to navigate from one Fragment to another, I get this weird error:

30条回答
  •  半阙折子戏
    2020-11-27 12:01

    If you click on too quickly , it will cause null and crash.

    We can use RxBinding lib to help on this. You can add throttle and duration on the click before it happens.

     RxView.clicks(view).throttleFirst(duration, TimeUnit.MILLISECONDS)
                .subscribe(__ -> {
                });
    

    These articles on throttling on Android might help. Cheers!

提交回复
热议问题