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 trialHernán Chilabert
348 PointsI can't cast findViewById method
This is the message that I see: textView1 cannot be resolved or is not a field. And there are 2 options:
- create field 'textView1' int type 'id'
- create constant 'textView1' int type 'id'
When I try with one of these, eclipse can't create it...
How can I fix it? Thanks!
2 Answers
Hiroki Hokari
5,308 PointsI guess the id of the TextView is not textView1, matbe textView? or perhaps you just named it after the function, which btw is very good way to keep habit. Check out the id in the xml.
Hernán Chilabert
348 PointsThanks!!! :)