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

Unfortunately Crystal Ball has stopped working

I keep getting this error every time I try to run the app

07-14 19:12:22.159: E/AndroidRuntime(1231): FATAL EXCEPTION: main 07-14 19:12:22.159: E/AndroidRuntime(1231): Process: com.example.crystalball, PID: 1231 07-14 19:12:22.159: E/AndroidRuntime(1231): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.crystalball/com.example.crystalball.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.app.ActivityThread.access$800(ActivityThread.java:135) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.os.Handler.dispatchMessage(Handler.java:102) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.os.Looper.loop(Looper.java:136) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.app.ActivityThread.main(ActivityThread.java:5017) 07-14 19:12:22.159: E/AndroidRuntime(1231): at java.lang.reflect.Method.invokeNative(Native Method) 07-14 19:12:22.159: E/AndroidRuntime(1231): at java.lang.reflect.Method.invoke(Method.java:515) 07-14 19:12:22.159: E/AndroidRuntime(1231): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 07-14 19:12:22.159: E/AndroidRuntime(1231): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 07-14 19:12:22.159: E/AndroidRuntime(1231): at dalvik.system.NativeStart.main(Native Method) 07-14 19:12:22.159: E/AndroidRuntime(1231): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 07-14 19:12:22.159: E/AndroidRuntime(1231): at com.example.crystalball.MainActivity.onCreate(MainActivity.java:18) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.app.Activity.performCreate(Activity.java:5231) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 07-14 19:12:22.159: E/AndroidRuntime(1231): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 07-14 19:12:22.159: E/AndroidRuntime(1231): ... 11 more

Figured it out!!! WOOOOOO!!!

Having same issue Terrence, How did you figure it out?

4 Answers

Figured it out!!! WOOOOO!!!

Hi Terrence, same issue as well. Could you tell us of how to do that?

I followed the directions from the teachers notes that describes the error that occurs when changing the app theme. I had everything correct but I forgot to change the theme back to app theme in my Android Manifest file.