Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test the Cupcake app: Android Basics with Compose #109

Open
bielsnohr opened this issue Sep 15, 2024 · 0 comments
Open

Test the Cupcake app: Android Basics with Compose #109

bielsnohr opened this issue Sep 15, 2024 · 0 comments

Comments

@bielsnohr
Copy link

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-test-cupcake?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-4-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-test-cupcake#3

In which task and step of the codelab can this issue be found?

Task 4, Step 6

Describe the problem

The code snippet in the step is missing the import of the ComposeNavigator()

import androidx.compose.ui.platform.LocalContext

fun setupCupcakeNavHost() {
    composeTestRule.setContent {
        navController = TestNavHostController(LocalContext.current).apply {
            navigatorProvider.addNavigator(ComposeNavigator())
        }
        CupcakeApp(navController = navController)
    }
}

Steps to reproduce?

Copy the code snippet above into IDE and notice that ComposeNavigator() can't be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant