Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Cassandra Gugoff600 Points
Hello! I have entered the same exact thing that the video shows and am getting an error message of "Inconvertible types"
It says showFactButton never used
Your code looks correct however you're doing little errors, you have:
Button showFactButton = (Button) findViewById(R.id.showFactButton);
Really, you should have:
Button newFactButton = (Button) findViewById(R.id.showFactButton);
The reason why you're getting an error is simply because you're naming your new button "showFactButton" and then your trying to find the view by id called 'showFactButton" so in other words, you're basically setting the name of the button the same as the name of a button you're looking for as 'showFactButton' already exists so you shouldn't be trying to create a new one.
Hope this helps