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 trial

Android Build a Simple Android App Improving Our Code Using the New Colors

"Unfortunately, Fun Facts has stopped" error message, please help.

There are no errors in my code. When I open the Fun facts app, the initial screen appears with nothing wrong. However the instant I click the button, I get the error message that fun facts has stopped. I would post a screenshot here but treehouse won't let me. Please help!

2 Answers

Hi Grant,

The bottom window of Android Studio shows the LogCat - I bet there's an error or two in there relating to your program. Can you scroll through it to find the errors listed in there and paste them into here?

You'll see a lot of text in the Log but it is pretty clear which bits relate to your code. Just copy those over.

And, yes, posting screenshots is a bit of a pain. You can do it with the Markdown Cheatsheet, but it is flaky at times - I'll show off ... :smile:

screen

Let us have the error log and we should be able to get to the bottom of your problem. It'll be in your code, but just visible at runtime as an error. If you want to post your code now, that may help - you'll only have to do it later anyway! :+1:

Steve.

My app also crashed - but fixing this line: color = mColors[randomNumber] + " "; - to remove the '+ " "' from when it was copy/pasted over fixed it. I had been typing at someone during that part of the video, my brain thinking "yeah yeah, copy/paste, got it".