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! While you're at it, check out some resources Treehouse students have shared here.
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 trialBraeden Adams
687 PointsTextView and Button are Red Errors
The words TextView and Button are considered Errors, and they are not errors in the Course Video.
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fun_facts);
//Declare our View variables
TextView factLabel;
Button showfactbutton;
}
2 Answers
James Simshaw
28,738 PointsHello,
You probably have not imported the proper classes yet. Could you try selecting each of the underlined class names and hit Alt+Enter and then select, Import Class. If this doesn't work, you could try doing Build, Clean and/or File, Invalidate Caches/Restart.
adam bechtol
Courses Plus Student 267 PointsThanks
Braeden Adams
687 PointsBraeden Adams
687 PointsYep! That worked! Thx!
James Simshaw
28,738 PointsJames Simshaw
28,738 PointsYou're welcome. Have fun with Android development.
Max Lepper
6,098 PointsMax Lepper
6,098 PointsWow yeah, that's a super easy fix. Thanks!