0

I've multi-modules setup with Navigation Component with multiple navigation graphs which all have been included in the main app's navigation graph file. But when I try to navigate to one of the children within another module navigation graph this error is being thrown.

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.app, PID: 26724
    java.lang.IllegalArgumentException: Navigation action/destination com.example.app:id/singleTranslationHadithDetailDialog cannot be found from the currentdestination Destination(com.example.app:id/duaDetailListFragment) label=DuaDetailListFragment class=com.example.app.ui.fragments.dua.DuaDetailListFragment
        at androidx.navigation.NavController.navigate(NavController.kt:1216)
        at androidx.navigation.NavController.navigate(NavController.kt:1149)
        at androidx.navigation.NavController.navigate(NavController.kt:1131)

As per official documenentation: Nested graphs have their own start destination and don’t expose their child destinations separately.

I'm trying the DeepLink solution (and some place I already have DeepLink implemented), but the problem is the targeted destination (action/destination com.example.app:id/singleTranslationHadithDetailDialog) I'm trying to go has params with an array of integer, How can add integer[] in DeepLink Uri path parameter like following:

<argument
        android:name="references"
        app:argType="integer[]"
        app:nullable="false" />

Now, what should I do? How can I overcome this situation?

Thanks.

Riajul
  • 1,140
  • 15
  • 20

0 Answers0