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 trialDanny Malaeb
2,459 PointsIs there an issue with my Android studio?
I type 'TextView' and 'Button' but it appears in red. If I hover my mouse over it receive an error "Cannot resolve symbol 'button'".
This is what I have so far...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fun_facts);
// Declare our View variables
TextView factLabel = findViewById();
Button showFactButton;
}
I know it shouldn't have an error because in the tutorial it doesn't appear as an error.
2 Answers
Peter Price
4,007 PointsHi Danny,
I had the same problem. Just click in the red writing and hit "Alt + Enter", and "Enter" again and it should import the correct folder automatically and the red should go away.
If you have any questions or problem, shoot right back.
Peter Price
4,007 PointsNo problem, glad I could help.
Danny Malaeb
2,459 PointsDanny Malaeb
2,459 PointsThanks Peter!