Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ma...@gmail.com <ma...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit c73bd92631a2ff341f89001bc9143c7b998333e8
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu Aug 18 18:03:13 2022
Add project dependency constraint between lifecycle-viewmodel and lifecycle-viewmodel-savedstate
Added bi-directional project version constraint between
lifecycle-viewmodel and lifecycle-viewmodel-savedstate.
If both artifacts are in the dependency tree, their
versions should match. This will now be enforced by gradle
automatically bumping up either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I3ab2abf9b6b1861038afc0e651da80e4ee75efb8
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
https://android-review.googlesource.com/2189976
Branch: androidx-main
commit c73bd92631a2ff341f89001bc9143c7b998333e8
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu Aug 18 18:03:13 2022
Add project dependency constraint between lifecycle-viewmodel and lifecycle-viewmodel-savedstate
Added bi-directional project version constraint between
lifecycle-viewmodel and lifecycle-viewmodel-savedstate.
If both artifacts are in the dependency tree, their
versions should match. This will now be enforced by gradle
automatically bumping up either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I3ab2abf9b6b1861038afc0e651da80e4ee75efb8
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
ch...@moqi.co.uk <ch...@moqi.co.uk> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e7a81dc92c9c56b31455c75161a8becf49f761e3
Author: Sanura N'Jaka <sanura@google.com>
Date: Wed Aug 17 22:44:55 2022
Add project dependency constraint between lifecycle-runtime and lifecycle-runtime-compose
Added bi-directional project version constraint between
lifecycle-runtime and lifecycle-runtime-compose. If both
artifacts are in the dependency tree, their versions
should match. This will now be enforced by gradle
automatically bumping up either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I0f6b3928ac0b338b0fcc6835828dd43fadee8c0d
M lifecycle/lifecycle-runtime-compose/build.gradle
M lifecycle/lifecycle-runtime/build.gradle
https://android-review.googlesource.com/2189951
Branch: androidx-main
commit e7a81dc92c9c56b31455c75161a8becf49f761e3
Author: Sanura N'Jaka <sanura@google.com>
Date: Wed Aug 17 22:44:55 2022
Add project dependency constraint between lifecycle-runtime and lifecycle-runtime-compose
Added bi-directional project version constraint between
lifecycle-runtime and lifecycle-runtime-compose. If both
artifacts are in the dependency tree, their versions
should match. This will now be enforced by gradle
automatically bumping up either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I0f6b3928ac0b338b0fcc6835828dd43fadee8c0d
M lifecycle/lifecycle-runtime-compose/build.gradle
M lifecycle/lifecycle-runtime/build.gradle
il...@google.com <il...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit b671082b2d2ba47ca41f33646780e797ac6689cc
Author: Sanura N'Jaka <sanura@google.com>
Date: Wed Aug 17 20:02:11 2022
Add project dependency constraint between lifecycle-common and lifecycle-runtime
Added bi-directional project version constraint between lifecycle-common and
lifecycle-runtime. If both artifacts are in the dependency tree, their versions
should match. This will now be enforced by gradle automatically bumping up
either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I98fea6d1a6b2cde61b0cf5c7822cd98b6218c578
M lifecycle/lifecycle-runtime/build.gradle
M lifecycle/lifecycle-common/build.gradle
https://android-review.googlesource.com/2188999
Branch: androidx-main
commit b671082b2d2ba47ca41f33646780e797ac6689cc
Author: Sanura N'Jaka <sanura@google.com>
Date: Wed Aug 17 20:02:11 2022
Add project dependency constraint between lifecycle-common and lifecycle-runtime
Added bi-directional project version constraint between lifecycle-common and
lifecycle-runtime. If both artifacts are in the dependency tree, their versions
should match. This will now be enforced by gradle automatically bumping up
either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I98fea6d1a6b2cde61b0cf5c7822cd98b6218c578
M lifecycle/lifecycle-runtime/build.gradle
M lifecycle/lifecycle-common/build.gradle
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit f9794b48f28888fa27810c9b758062461d632454
Author: Sanura N'Jaka <sanura@google.com>
Date: Wed Aug 17 22:26:13 2022
Add project dependency constraint between lifecycle-runtime and lifecycle-runtime-testing
Added bi-directional project version constraint between
lifecycle-runtime and lifecycle-runtime-testing. If both
artifacts are in the dependency tree, their versions
should match. This will now be enforced by gradle
automatically bumping up either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I3ef6323dbdd3da20bad912e1bd7b9000e6832b7d
M lifecycle/lifecycle-runtime-testing/build.gradle
M lifecycle/lifecycle-runtime/build.gradle
https://android-review.googlesource.com/2188586
Branch: androidx-main
commit f9794b48f28888fa27810c9b758062461d632454
Author: Sanura N'Jaka <sanura@google.com>
Date: Wed Aug 17 22:26:13 2022
Add project dependency constraint between lifecycle-runtime and lifecycle-runtime-testing
Added bi-directional project version constraint between
lifecycle-runtime and lifecycle-runtime-testing. If both
artifacts are in the dependency tree, their versions
should match. This will now be enforced by gradle
automatically bumping up either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I3ef6323dbdd3da20bad912e1bd7b9000e6832b7d
M lifecycle/lifecycle-runtime-testing/build.gradle
M lifecycle/lifecycle-runtime/build.gradle
Description
android.arch.navigation:navigation-fragment-ktx
android.arch.navigation:navigation-ui-ktx
Version used:
1.0.0-alpha05
Devices/Android versions reproduced on:
-SM-A510F, Android 7.0
-Emulator x86_64 API 28
Sample project:
Description:
Having this structure:
nav_graph.xml
<navigation
android:id="@+id/nav_graph"
app:startDestination="@id/startFragment">
<fragment
android:id="@+id/startFragment"
android:name="com.example.navbug.StartFragment"
android:label="StartFragment"
tools:layout="@layout/fragment_start">
<action
android:id="@+id/action_startFragment_to_nested_nav_graph"
app:destination="@id/nested_nav_graph" />
</fragment>
<include app:graph="@navigation/nested_nav_graph" />
</navigation>
nested_nav_graph.xml
<navigation
android:id="@+id/nested_nav_graph"
app:startDestination="@id/nestedStartFragment">
<fragment
android:id="@+id/nestedStartFragment"
android:name="com.example.navbug.NestedStartFragment"
android:label="NestedStartFragment">
<action
android:id="@+id/action_nestedStartFragment_to_nestedSecondFragment"
app:destination="@id/nestedSecondFragment"
app:popUpTo="@+id/nestedStartFragment"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/nestedSecondFragment"
android:name="com.example.navbug.NestedSecondFragment"
android:label="NestedSecondFragment" />
</navigation>
I want to achieve this navigation pattern:
StartFragment => NestedStartFragment => NestedSecondFragment =(back)=> StartFragment
I'm trying to implement this by setting the action NestedStartFragment=>NestedSecondFragment with the options [popUpTo=NestedStartFragment, popUpToInclusive=true], so that the resulting stack would be:
0. NestedSecondFragment
1. NestedNavGraph
2. StartFragment
3. NavGraph
When navigating from NestedStartFragment to NestedSecondFragment, the following execption occurs:
java.lang.IllegalArgumentException: Navigator androidx.navigation.fragment.FragmentNavigator@ccc9092 reported navigation to unknown destination id com.example.navbug:id/nestedSecondFragment
at androidx.navigation.NavController$2.onNavigatorNavigated(NavController.java:142)
at androidx.navigation.Navigator.dispatchOnNavigatorNavigated(Navigator.java:217)
at androidx.navigation.fragment.FragmentNavigator.navigate(FragmentNavigator.java:207)
at androidx.navigation.fragment.FragmentNavigator.navigate(FragmentNavigator.java:45)
at androidx.navigation.NavDestination.navigate(NavDestination.java:407)
at androidx.navigation.NavController.navigate(NavController.java:683)
at androidx.navigation.NavController.navigate(NavController.java:630)
at androidx.navigation.NavController.navigate(NavController.java:618)
at com.example.navbug.NestedStartFragment$onViewCreated$1.onClick(Fragments.kt:31)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Right before the navigation, the stack is:
0. NestedStartFragment
1. NestedNavGraph
2. StartFragment
3. NavGraph
When NestedStartFragment is popped on my request, NestedNavGraph is also popped because
"// We never want to leave NavGraphs on the top of the stack" (from NavController.onNavigatorNavigated)
with the effect that eventually the requested destination NestedSecondFragment is pruned from the graph and cannot be reached anymore.
Unless I'm doing something wrong, it seems that NavGraph automatic popping should be avoided if the final destination actually belongs to it.