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 (2014) Coding the Fun Facts Using Conditionals (else Statements)

Andres Morales
Andres Morales
10,634 Points

App keeps crashing, what could be the problem

I keep getting the message ´Unfortunately, FunFacts has stopped', and I can't get past this, everything seems to be fine with my code...

Farouk Charkas
Farouk Charkas
1,957 Points

Yea, I have the same question.

Farouk Charkas
Farouk Charkas
1,957 Points

Yea, I have the same question.

3 Answers

Andres Morales
Andres Morales
10,634 Points

So, I did some digging around here in the forums, and found this answer from Sameer Khan: "Please ensure that your app activity extends "Activity" and not "ActionBarActivity". It fixed the problem!

Akash malhotra
Akash malhotra
3,025 Points

I had the same issue. If cleaning and rebuilding your project doesn't work, try reinstalling android studio

Farouk Charkas
Farouk Charkas
1,957 Points

how? P.S. Dont stop replying until Andres Morales approves so

Jacob Bergdahl
Jacob Bergdahl
29,118 Points

Look in the Android log. Search for "caused by" and see what the error says and on what line. You do not need to reinstall Android Studio, it won't change anything.

Andres Morales
Andres Morales
10,634 Points

I looked in the Android log, and it did say that the app.compat theme was causing the problem, but I didn't know how to fix it. I tried changing the theme, but that didn't work either. What worked for me, as mentioned above, make my app activity extend "Activity" and not "ActionBarActivity".