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 trial

Android Build a Simple Android App Basic Android Programming Accessing Views in Code: Declaring Variables

TextVIEW in red.

I can't get the private statement out of red. I hit alt enter and get an auto generated implement the app indexing API.

AYDIN ÜNAL
AYDIN ÜNAL
5,638 Points

import android.widget.TextView; write directly this.

This will make the "TextView" become normal? Thank you for your reply.

private import.android.widget.TextView;

will this be correct?

2 Answers

AYDIN ÜNAL
AYDIN ÜNAL
5,638 Points

nope. there is a part like this "import..." open it by clicking + near it. then add this line : import android.widget.TextView;

Ok it's finally out of red. Will it have any other issues? Thank you for your help.

Luke Horvath
Luke Horvath
590 Points

Make sure you write it as 'TextView', not 'textview'