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 trialDavid Bell
208 PointsI don't know what else to do
I keep getting the following error but don't understand what it means.
./com/example/crystal/ball/MainActivity.java:18: cannot find symbol symbol : method findViewyById(int) location: class com.example.crystal.ball.MainActivity Button getAnswerButton = (Button) findViewyById(R.id.button1); ^ 1 error
3 Answers
Paul Stevens
4,125 PointsHello,
You have a spelling mistake in this line of code
Button getAnswerButton = (Button) findViewyById(R.id.button1);
It needs to be findViewById, you have an extra "y" after the word "view" It should be as below:
Button getAnswerButton = (Button) findViewById(R.id.button1);
Hope this helps. :D
Ben Rubin
Courses Plus Student 14,658 PointsThat error means that a method or variable isn't declared.. Make sure you have all the necessary imports, and that your MainActivity class extends Activity. If you're in Eclipse, you can organize imports with ctrl + shift + o. Your MainActivity class declaration should be
public class MainActivity extends Activity
Paul Stevens
4,125 PointsMore than welcome, they are the worst, because it looks fine if you read it yourself, and it makes no sense why it won't work, I have fallen foul of that so many times.
Glad I could help. :D
David Bell
208 PointsDavid Bell
208 PointsMan, that was so frustrating...I just kept looking at it with overflowing frustration but never saw that stupid extra Y. Thank you so much!!!!