Navigation between different screens and apps is a core part of the user experience. Android Jetpack Navigation Component helps the developer to implement it following the good practices. For more info see documentation: https://developer.android.com/guide/navigation
Questions tagged [android-jetpack-navigation]
834 questions
4
votes
2 answers
App crashes when navigating jetpack compose
I have total 2 screens i.e SplashScreen and BottomNavScreen(with bottom navigation).
BottomNavScreen has 2 screens i.e Screen1 and Screen2.
I want to go back to SplashScreen from Screen2 but i was getting this error while navigating to…

Konark Shivam
- 160
- 1
- 7
4
votes
5 answers
Deep Links navigation in Jetpack Compose
I want to use deep links with Jetpack Compose's Nav Host and followed this page on Compose Navigation: https://developer.android.com/jetpack/compose/navigation#deeplinks
My implementation:
AndroidManifest.xml:

Mr. Pine
- 239
- 3
- 13
4
votes
1 answer
How to overcome this build error when trying to run jetpack compose instrumentation tests
I've followed the jetpack compose navigation codelab. Everything was going well until it came to testing the NavHost in step 7.
When trying to run the tests, I get the following error and stack trace :
FAILURE: Build failed with an exception.
*…

Chris
- 4,662
- 2
- 19
- 27
4
votes
1 answer
BottomNavigationView. Navigation to destination with deeplink cause to add destination fragment also in first tab
Let's say we have a bottom navigation view with 4 tabs, we have a deeplink for a fragment of 4 tab, so when navigating from this deeplink to 4 tab - it works as it should, but when after that manually select the first tab, a fragment of 4 tab is…

Alex Alex
- 131
- 7
4
votes
1 answer
Deeplink isn't correctly redirect if app is closed
I'm using Jetpack Navigation for deeplinks. Deeplink isn't redirect correctly if the app wasn't opened before. However, if the app exists in memory, the app is coming to the foreground and deeplink is opening correctly. I have 2 activity. One…

Serhat
- 187
- 1
- 14
4
votes
1 answer
ContentScale.FillWidth is not working Jetpack Compose
I am trying to make a Composable which I can ruse by passing image of any size to fill its Width by using
compose_version = 1.0.0-beta07
@Composable
fun image(image:Int){
Image(painter = painterResource(image),
…
user15686227
4
votes
2 answers
Jetpack Compose TopAppBar flickers after setting BottomNavView with Navigation component
Working on a Jetpack Compose app with a BottomNavigationView and Navigation component, I did the usual setup for the bottom bar inside the activity:
val navHostFragment =
supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as…

Andrei Mesh
- 256
- 2
- 20
4
votes
2 answers
NavContoller Leaking in Fragment
I am have trouble finding the cause of the leaks happening when I transition between fragments using JetPack Navigation.
See below the stack trace of the from leak canary
D/LeakCanary:
┬───
│ GC Root: System class
│
├─…

Elphas Khajira
- 142
- 8
4
votes
1 answer
Android Jetpack Compose crashes when importing navigation compose
i am trying to build an Android JetPack Compose app. My problem is that when i import the bottom navigation dependency in build.gradle:
def nav_compose_version = "1.0.0-alpha01"
implementation…

Răzvan Rujoiu
- 1,145
- 12
- 18
4
votes
0 answers
Background concurrent copying GC freed - app crashes
i got this message after crashes app (after 3sec run on emulator):
Background concurrent copying GC freed 48349(2MB) AllocSpace objects, 2(40KB) LOS objects, 50% free, 3MB/6MB, paused 1.116ms total 108.902ms
Memory on emulator:
RAM: 1536MB
VM heap:…

Michael
- 73
- 7
4
votes
1 answer
Resources$NotFoundException with include-dynamic navigation graph
I have a dynamic feature module with it's own nested navigation graph. I also have a dynamic feature module that's just a single fragment. If you have a dynamic feature module with it's own navigation graph, I understand you need to use the…

Nelson.b.austin
- 3,080
- 6
- 37
- 63
4
votes
1 answer
How to set `setReorderingAllowed` when using Navigation Architechture?
When postponing a fragment's enter transition when using Navigation Architecture the "home" fragment in the graph is visible for a microsecond. After googling a bit, the docs tell me to set setReorderingAllowed(true) on the fragmentManager to…

Dambakk
- 595
- 4
- 20
4
votes
2 answers
Can I use a String resource to generate the deeplink in a Jetpack Navigation XML file?
Let's say I have the following buildType section in my Gradle file:
buildTypes {
debug {
...
resValue "string", "DEEPLINK_EXAMPLE", "appnamedebug://detail/{detail_id}"
...
}
release {
...
resValue…

Gensoukyou1337
- 1,507
- 1
- 13
- 31
4
votes
2 answers
Jetpack Navigation Component with Jetpack Compose compatible?
I've been searching through documentation and I could not find a confirmation. Does anyone know if the navigation and compose component from Android Jetpack are compatible with each other?
I know that Jetpack Compose is not production ready and is…

ljtomev
- 898
- 7
- 11
4
votes
1 answer
OkHttpInterceptor navigating from kotlin interceptor to login fragment
Im struggling here a little bit.
What i am trying to achieve is to navigate from a Httpinterceptor back to the login fragment if a 401 occurs.
Im using Jwt for authorization and if the token is not valid anymore a 401 unauthorized will be returned…

Toastbrewt
- 43
- 4