google-developer-training / android-fundamentals-apps-v2

Other
649 stars 2.63k forks source link

Android Kotlin Fundamentals codelab: #355

Closed nisathnasar closed 1 year ago

nisathnasar commented 2 years ago

Describe the problem Task requires to create a Text view with the xml attribute: android:background | "@color/colorPrimary"

The project doesn't have colorPrimary in the color folder, probably due to an update, I can see it inside the res/values/themes/themes.xml (or) themes.xml (night)

In which lesson and step of the codelab can this issue be found? Unit 1.3 Task 1.6

How to reproduce? Create a fresh project and call this line of code in a TextView attribute.

Versions

  1. Android Studio Dolphin 2021.3.1
  2. Marshmallow

Additional information I've done Android Dev before but just trying to brush up and I can tell this has definitely changed. I checked the entire lab to see if they mention the error and tell us to assign a new primary color value in colors.xml but it doesn't which means it must be a mistake. In addition, what seems to fix the issue is type this instead: android:textColor="?colorPrimary"

codelab: android-fundamentals

jlulovics commented 1 year ago

Hello! Thank you for your feedback. This codelab is out of date and no longer maintained. Instead, please refer to the Android Basics with Compose course for the latest recommended practices. If you are looking for content on Views, you can check out the Android Basics in Kotlin course.