navigation3
| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
|---|---|---|---|---|
| October 22, 2025 | - | - | 1.0.0-beta01 | - |
Declaring dependencies
To add a dependency on navigation3, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle file for
your app or module:
Groovy
dependencies { implementation "androidx.navigation3:navigation3-runtime:1.0.0-beta01" implementation "androidx.navigation3:navigation3-ui:1.0.0-beta01" }
Kotlin
dependencies { implementation("androidx.navigation3:navigation3-runtime:1.0.0-beta01") implementation("androidx.navigation3:navigation3-ui:1.0.0-beta01") }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
There are no release notes for this artifact.
Version 1.0
Version 1.0.0-beta01
October 22, 2025
androidx.navigation3:navigation3-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
API Changes
SceneStrategyScopenow only has a no argument public constructor, suitable for testing yourSceneStrategyand the returnedScenein isolation. For more complex use cases, please userememberSceneState(). (I8440c, b/451679047)
Bug Fixes
- Fixed infinite loop when chaining
SceneStrategywiththen. (Iba3f0, b/450323470) - Fixed screen flicker when swapping the
backStackpassed toNavDisplayand using animations. (Ief7b5, b/450967248)
Version 1.0.0-alpha11
October 08, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.
API Changes
- The
calculateScenemethod onSceneStrategyis no longer@Composable. Instead, consider moving this work to the construction of yourSceneStrategymethod (i.e., in arememberMySceneStrategy()method) that fully allows you to define the lifetime of anyrememberSaveablevalues or keyrememberstatements off of the correct values. (If1733, b/448709506) - The
onBackparameter forSceneStrategy.calculateScenehas been moved into the new receiver scope ofSceneStrategyScopeto make it more clear that this is an optional parameter and provide an extension point for future Navigation3 features. (I3aea3, b/448460407) - The
onBacklambda passed intoNavDisplayand to yourSceneStrategyno longer provides acount: Intparameter to indicate when multiple entries should be popped. Instead, the() -> Unitlambda will now be called multiple times in a row in the rare case where your Scene requests popping multiple entries. (Idedb5, b/446989346) - Remove the
NavEntryWrapperclass and replace its functionality with a finalNavEntryclass with a new secondary constructor that takes aNavEntrywith new content. This will allow continued support for wrapping an entry with new content. (I7da2a, b/444447130) - The
navEntryDecoratorfunction which creates and returns aNavEntryDecoratorhas been removed and replaced by theNavEntryDecoratorclass which is now made public and open for subclassing. (If81f8, b/444447434, b/447381176) SavedStateNavEntryDecoratorhas been renamed toSaveableStateHolderNavEntryDecoratorsince it decorates entries with aSaveableStateHolder. The decorator has also been refactored from a function to a class since it is functionally a factory forNavEntryDecorator. (Ie6013, b/447381176)- Custom displays using
SceneStateas an alternative to usingNavDisplayno longer are required to use theLocalEntriesToRenderInCurrentScenecomposition local, which is now internal. (Ic40ef, b/414668196) - Removed
SceneSetupNavEntryDecoratorandrememberSceneSetupNavEntryDecorator()from the public API surface. This functionality now is included by default without requiring you to manually include it. (Ieae42, b/444479133) NavEntry,DialogScene,SinglePaneScene, andSceneStatenow all implement equals. (I96121)- Scene interface has a new metadata field to attach scene-specific metadata for NavDisplay. This allows a Scene to override the metadata on the
NavDisplay, for instance with transitions. (I1fd96, b/443955625) - Simplify
rememberNavBackStacksignature by removing the redundant generic type parameter. The function now acceptsvararg elements: NavKey. (I03e45) - The default animations for
NavDisplayare now part of the common API which allows them to be called from all platforms. (I71af9, b/447147159) - Rename
EntryProviderBuildertoEntryProviderScopeto accurately reflect that the class is a Kotlin DSL providing a scope to buildNavEntries. (Ia7465)
Bug Fixes
rememberNavBackStack()now enforces polymorphic serialization for NavKey and requires a customSavedStateConfigurationthat is configured to ensure correct state restoration. KDoc have been updated to reflect the requirement that all NavKey subtypes must be registered in the provided SerializersModule. (I6de37,I782f2, b/446664383)
Version 1.0.0-alpha10
September 24, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.
API Changes
- Add new
NavDisplayoverload that takes a list ofNavEntry<T>that has been decorated byrememberDecoratedNavEntries. (I4025b, b/441940314) - Moved
DialogSceneto a new package. (Ia5840) - Remove public API
DecorateNavEntry. Instead userememberDecoratedNavEntriesto wrap a NavEntry with a list of decorators. (Id8c09) - Navigation3 UI now provides new default
transitionSpecproperties. (Ibcabd) - Added a new
SceneStateobject to help manage scenes. This also provides a newNavDisplayoverload that takes theSceneStateand theNavigationEventState. (Idfb46, b/444479133) NavDisplaynow allows you to customize the transitions based on whatSceneyou are going to and from by looking at theTransition'scurrentStateandtargetState. (I906cc, b/443872322)NavigationEventInfois now anabstract classinstead of aninterface. Update all custom implementations to inherit from the class (e..g,data class MyInfo : NavigationEventInfo()). (I1e59c, b/444734264)- The
navigationevent-composehandler APIs are updated.NavigationEventHandlerandNavigationBackHandler(and variants) now support a new overload that accepts a hoistedNavigationEventStates. The simple overloads (takingcurrentInfo) are preserved and now use this new state model internally. (Ic3251, b/444734264) - All of the Scene APIs have been moved out of navigation3-ui to navigation3-runtime. This means they are now available on all platforms supported by navigation3-runtime. (I431d0, b/444449993)
- Added new
rememberDecoratedNavEntriesoverload that takes a list ofNavEntryto decorate. The input entries can be already decorated with other entry decorators. (I5a034, b/444230270) - Remove navigation3 wildcard type parameters (I02540)
- Improved the handling of generics for the
entryProviderDSL. If you were previously importingandroidx.navigation3.runtime.entry, this is no longer required. (I299fc) - Restrict the reflection-based
NavBackStackSerializeroverload to Android. This prevents implicit runtime serialization failures on non-Android platforms by enforcing the use of the explicitSavedStateConfigurationoverload in multiplatform code. (I73313, b/420443609) - Make
NavigationEvent'sswipeEdgean@IntDef(Icee54, b/443950342) - Restrict
NavBackStackserialization to Android. This prevents runtime failures on non-Android platforms. For multiplatform state saving, use therememberNavBackStackoverload with an explicitSavedStateConfiguration. (I1e418, b/420443609)
Bug Fixes
- Fix crash during predictive back when nested
NavDisplayhas a single child entry. (I2cdc0, b/441933162)
Version 1.0.0-alpha09
September 10, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.
API Changes
- The
DecoratedNavEntryProviderhas been replaced withrememberDecoratedNavEntriesthat creates and return NavEntries decorated with the list of provided decorators (I0fe1c, b/441328236) NavBackStackis now generic over theNavKeytype. This allows apps and libraries to define custom key types for their back stacks, rather than being restricted toNavKey. (I4d190,Iad2f4, b/420443609)NavBackStackis now@kotlinx.serialization.Serializable, making it possible to save and restore navigation state across process death and configuration changes without extra boilerplate. (I2c3cf, b/420443609)RememberNavBackStackhas been moved tocommonMainto ensure it is provided on all platform targets. (Id69e7, b/420443609)
Bug Fixes
NavDisplaynow correctly moves each individualNavEntryto the correctLifecycle.State. (I30aac, b/440145700)- Fixed an issue where
NavDisplaywould ignore any nestedNavigationEventDispatcherOwnerset via theNavigationEventlibrary'sLocalNavigationEventDispatcherOwner. (I6224a)
Dependency Changes
- Navigation3 now depends on NavigationEvent Alpha08.
Version 1.0.0-alpha08
August 27, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.
New Features
- Added new Kotlin MultiPlatform (KMP) targets to
Navigation3 Runtimeartifacts.Navigation3 Runtimenow supports the following platforms in total: JVM (Android and Desktop), Native (Linux, iOS, watchOS, macOS, MinGW), and Web (JavaScript, WasmJS). (I55078, b/424410398, b/419294028, b/419046226). Note: This does not provide KMP targets forNavigation3 UIartifact. On other platforms, you will need to implement your own customNavDisplay. If you would like to see it supported, please vote on the Jetbrains issue here and track the progress for additional support there. - The
NavDisplayInfoobject is now public and can be used to retrieve the list of visible entries from theNavDisplay. (Ibc91f)
API Changes
- Added a new
NavBackStackSerializerto be used in conjunction withrememberNavBackStackto perform state restoration.rememberNavBackStack()now also takes aSavedStateConfigurationthat can be used to provide your own configuration. (I2f4d2, I4cd58, b/420443609)
Bug Fixes
- Fixed an issue where navigating would cause incorrect Lifecycle events to fire. (I8bf6d, b/425901162, b/434109022)
Known Issues
- There was a bug introduced by I8bf6d that caused Lifecycles to be based on scenes instead of individual entries, which broke Lifecycle for any cases where the
keyprovided to theNavEntryis not aStringor yourNavEntryhas not overridden thecontentKeyand set it equal to thekey(note that doing this enforces that your key can be saved into aBundle). This has been fixed for the next release. (b/440145700)
Version 1.0.0-alpha07
August 13, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.
MinSdk Update
- The default minSdk for the AndroidX has been moved from API 21 to API 23 (Ibdfca, b/380448311, b/435705964, b/435705223)
API Changes
SavedStateNavEntryDecoratornow uses theSaveableStateRegistrybuilt intoSaveableStateProviderto save and restore states. (If8d9a)- The
predictivePopTransitionSpecis now provided the swipe edge as a parameter, allowing you to customize the transition based on what edge the user started the Predictive Back gesture from. (I753a8)
Bug Fixes
- Fixed an issue that would cause custom scenes to be infinitely recalculated because the most recent scene was not being remembered. (I7ba84, b/418153031)
Dependency update
- Navigation3 now depends on Navigation Event
1.0.0-alpha06.
Version 1.0.0-alpha06
July 30, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.
Dependency Update
- Navigation3 now depends on Navigation Event
1.0.0-alpha05.
Version 1.0.0-alpha05
July 2, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.
Behavior Changes
- The
NavEntry's state is now strictly based on the current list of decorators passed to theNavDisplay. This means that decorators should be swapped along your back stacks in the case of multiple back stacks in order to preserve the state of the NavEntries on the back stack. Otherwise, the states will be cleared as if the entries were popped (instead of a swap). (I7a759, b/428033667)
Version 1.0.0-alpha04
June 18, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.
API Changes
NavEntry.contentis now private. To invokeNavEntrycontent, call the newNavEntry.Content()api which no longer requires akeyparameter to invoke. (Icd0fd, b/420991203)NavEntry.keyis now a private field. TheNavEntryand its relevant states should be identified by the newcontentKeyfield which is generated from the newcontentKeyFactorylambda and defaults to a saveable hash generated fromNavEntry.key(I81a6c, b/422001357, b/420991203 I2d7d4, b/420991203, b/422841812)
Dependency Changes
- Navigation3 now depends on the new
androidx.navigationevent.composeartifact.
Version 1.0.0-alpha03
June 4, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
Bug Fixes
Navigation3will no longer clear decorator states forbackStacksthat have been swapped out and replaced with anotherbackStackinstance. (I28a42, b/415076044)
Version 1.0.0-alpha02
May 23, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
Bug Fixes
- Fixed an issue with the
SavedStateNavEntryDecoratorwhich caused collisions for different data classes with the same property values. (b/418070648, Iff4775) - Fixed a missing class issue that would cause crashes when running without declaring explicit dependencies. (b/419049149, I4b4ed)
Version 1.0.0-alpha01
May 20, 2025
androidx.navigation3:navigation3-*:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
New Features
Navigation3 is a new navigation library built specifically to handle Jetpack Compose in-app navigation. The androidx.navigation3.runtime artifact provides the building blocks, while the androidx.navigation3.ui artifact provides the UI layer via the NavDisplay API. Developers can provide their own state directly to the NavDisplay composable function, which changes the content based on changes in the developer state.
@Serialiable object Home : NavKey
@Serialiable object Chat : NavKey
val backStack = rememberNavBackStack(Home)
NavDisplay(backStack, entryProvider = entryProvider {
entry<Home> {
Column {
Text(“Home”)
Button(onClick = { backStack.add(Chat) } ) {
Text(“Go to Chat”)
}
}
}
entry<Chat> { /* My Composable Content */ }
})
For more information, see the Navigation3 guide.