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.

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".