Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Android Basics issue: #3

Closed
nicholeb opened this issue Oct 3, 2020 · 1 comment
Closed

Android Basics issue: #3

nicholeb opened this issue Oct 3, 2020 · 1 comment
Assignees

Comments

@nicholeb
Copy link

nicholeb commented Oct 3, 2020

https://developer.android.com/codelabs/basic-android-kotlin-training-display-list-cards?

"Use cards"

I made the changes to add the Material Card View and the app would crash with a logcat error that "The style on this component requires your app theme to be Theme.MaterialComponents" Was on a Nexus 6 emulator. I was able to resolve it by changing the theme.

Steps to reproduce?
Just follow the instructions for adding the card view and run the app.

Versions
What version of Android Studio are you using?
4.0.1

Additional information
Perhaps I missed an instruction for changing the theme earlier in the codelab, but I went back through it and didn't see anything.

@android-dev-lxl android-dev-lxl self-assigned this Oct 6, 2020
@android-dev-lxl android-dev-lxl added In progress Issue is being worked on. and removed In progress Issue is being worked on. labels Oct 6, 2020
@android-dev-lxl
Copy link

@nicholeb

Thank you so much for reporting this issue, yes you need to change the parent app theme, if you are in AS 4.0.
We added a the following note to the code lab and will be published shortly.

Note: If you’re using Android Studio 4.0, make this change to your res > values > styles.xml file. Change the parent app theme from Theme.AppCompat.Light.DarkActionBar to Theme.MaterialComponents.DayNight.DarkActionBar.

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

No branches or pull requests

2 participants