You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In build.gradle.kts instead of that sample code define it this way: buildscript { extra.apply { set("lifecycle_version", "2.5.1") } }
Then in app/build.gradle add two things
Before dependiencies block add: val lifecycle_version = rootProject.extra["lifecycle_version"]
In dependencies add: implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version")
URL of codelab https://github.com/google-developer-training/basic-android-kotlin-compose-training-dessert-clicker/tree/main
In which task and step of the codelab can this issue be found?
Set up dependencies
Describe the problem
buildscript ext does not work
Steps to reproduce?
buildscript {
ext {
lifecycle_version = '2.5.1'
}
}
Unresolved reference: ext
Versions
Android Studio version: Giraffe 2022.3.1 Patch 2
API version of the emulator: 32
Additional information
Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered: