In which task and step of the codelab can this issue be found?
after adding the CenterAlignedTopBar(), preview stopped working and app would not run in emulator
Describe the problem
e: file:///home/tim/StudioProjects/basic-android-kotlin-compose-training-woof/app/src/main/java/com/example/woof/MainActivity.kt:167:5 This material API is experimental and is likely to change or to be removed in the future.
Steps to reproduce?
Go to...
Click on...
See error...
VersionsAndroid Studio version:
Android Studio Giraffe | 2022.3.1 Patch 2
Build #AI-223.8836.35.2231.10811636, built on September 14, 2023
Runtime version: 17.0.6+0-17.0.6b829.9-10027231 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.13.0-22-lowlatency
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Current Desktop: KDE
API version of the emulator:
Additional informationInclude screenshots if they would be useful in clarifying the problem.
Adding @OptIn(ExperimentalMaterial3Api::class fixed the issue. Please update the noted page.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-material-theming?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-3-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-material-theming#6
In which task and step of the codelab can this issue be found? after adding the CenterAlignedTopBar(), preview stopped working and app would not run in emulator
Describe the problem e: file:///home/tim/StudioProjects/basic-android-kotlin-compose-training-woof/app/src/main/java/com/example/woof/MainActivity.kt:167:5 This material API is experimental and is likely to change or to be removed in the future.
Steps to reproduce?
Versions Android Studio version: Android Studio Giraffe | 2022.3.1 Patch 2 Build #AI-223.8836.35.2231.10811636, built on September 14, 2023 Runtime version: 17.0.6+0-17.0.6b829.9-10027231 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.13.0-22-lowlatency GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Registry: external.system.auto.import.disabled=true ide.text.editor.with.preview.show.floating.toolbar=false
Current Desktop: KDE
API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.
Adding @OptIn(ExperimentalMaterial3Api::class fixed the issue. Please update the noted page.