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

Add a ViewModel to Dessert Clicker: Android Basics in Compose #27

Open
alexbft opened this issue Jan 14, 2024 · 0 comments
Open

Add a ViewModel to Dessert Clicker: Android Basics in Compose #27

alexbft opened this issue Jan 14, 2024 · 0 comments

Comments

@alexbft
Copy link

alexbft commented Jan 14, 2024

Codelab - Practice: Add a ViewModel to Dessert Clicker

Codelab step 3 - Set up dependencies

It says to add this fragment to build.gradle:

buildscript {
   ext {
       ...
       lifecycle_version = '2.5.1'
   }
}

Which isn't working for kotlin DSL. I had to add this instead:

buildscript {
    val lifecycle_version by extra("2.5.1")
}

The second snippet doesn't work either, I used this:

implementation("androidx.lifecycle:lifecycle-viewmodel-compose:${rootProject.extra["lifecycle_version"]}")
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