Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
samuel zaffran24,815 Points
Mistake in the challenge
Hi, It's look like there is a mistake in the challenge cause i tried different ways but i still have this result in the bummer : MealActivity.kt:13:55: error: unresolved reference: RelativeLayout val mealLayout = findViewById(R.id.mealLayout) as RelativeLayout
Ben DeitchTreehouse Teacher
Hey Samuel, good catch! It looks like that code challenge is missing an import statement for RelativeLayout. I've added it back in. If you refresh the page or just add this bit to the top,
import android.widget.RelativeLayout, you should be good to go :)
Mine is set as a RelativeLayout, and it's not working for me either. I tested it after getting it wrong in the Challenge (I used SetBackgroundColor() too), and it's not working. Also tried without the "!!", but no luck.