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 trialkaihan badarpura
2,869 Pointscode problem
syntax errors add button1
kaihan badarpura
2,869 Points// Declare our view variables
TextView answerLabel = (TextView) findViewById(R.id.textView1);
Button getAnswerButton = (Button) findViewById(R.id.Button1);
}
Ben Junya
12,365 PointsHey dude, we can't help you if we don't know exactly what's going on. It's extremely difficult for any of us here to know what you're talking about. Are you trying to add a button in the XML layout? Or are you trying to set a Button variable in your activity? We don't know what you're asking of us. At the very least, maybe copy and paste in your code and tell us what the problem is.
1 Answer
Gunjeet Hattar
14,483 PointsWhat I can infer from your code is it should't be R.id.Button1, but R.id.button1 ... button with a small b unless you have specified it with a capital letter otherwise
Hope that helps
Ethan Lowry
Courses Plus Student 7,323 PointsEthan Lowry
Courses Plus Student 7,323 PointsYou're going to have to provide your relevant section of code and the exact error logs you're getting if people are going to be able to help you at all.