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 trialDanika Guiley
1,247 PointsCan't find FactTextView
I set the mFactTextView as follows: mFactTextView = (TextView)findViewById(R.id.); It can not locate the FactTextView which I set in the global as follows: private TextView mFactTextView; I also set the prefix to m like in the video. I have also pressed 'Clean Project' which has been instructed in your other answers. Thank you
3 Answers
sukjae lee
5,705 Pointscheck res > layout > activity_fun_facts.xml. (in android view) should have [android:id="@+id/factTextView"] inside of [TextView]
think this as selector in html&css
Seth Kroger
56,413 PointsThere's probably an error in your layout file preventing it from being built, which is preventing R.id.factViewText from being generated and picked up.
Beatriz Fuentes
2,207 Pointsmake sure you have assigned an ID to the textview in the XML file or design view , once done make sure to use the same spelling , remember JAVA is case sensitive