I have a fragment:
class SomeFragment {
private val args by navArgs<SomeFragmentArgs>()
}
this fragment is used in two navigation graph:
first_nav.xml
....
<fragment
android:id="@+id/initialFragment"
android:name="com.example.InitialFragment"
android:label="Initial Fragment">
<action
android:id="@+id/action_to_some_fragment"
app:destination="@id/someFragment" />
</fragment>
<fragment
android:id="@+id/someFragment"
android:name="com.example.SomeFragment"
android:label="Some Label">
<argument
android:name="someType"
app:argType="com.example.someType"/>
</fragment>
....
second_nav.xml
....
<fragment
android:id="@+id/initialFragment2"
android:name="com.example.InitialFragment2"
android:label="Initial Fragment">
<action
android:id="@+id/action_to_some_fragment"
app:destination="@id/someFragment" />
</fragment>
<fragment
android:id="@+id/someFragment"
android:name="com.example.SomeFragment"
android:label="Some Label">
<argument
android:name="someType"
app:argType="com.example.someType"/>
</fragment>
....
But when I build the project for release R8 throws:
R8: Program type already present: com.example.SomeFragmentArgs$Companion
Can anyone help me on this?