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

Help!

When I run my application, it adds it onto my phone. When i click on the application, it responds "Unfortunately, Crystal Ball has stopped".

Can you please post the stack trace? There is probably some useful information about why your app is crashing.

2 Answers

08-17 16:20:25.076: I/PersonaManager(20020): getPersonaService() name persona_policy 08-17 16:20:25.086: D/AndroidRuntime(20020): Shutting down VM 08-17 16:20:25.086: W/dalvikvm(20020): threadid=1: thread exiting with uncaught exception (group=0x41751da0) 08-17 16:20:25.096: E/AndroidRuntime(20020): FATAL EXCEPTION: main 08-17 16:20:25.096: E/AndroidRuntime(20020): Process: com.example.crystallball, PID: 20020 08-17 16:20:25.096: E/AndroidRuntime(20020): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.crystallball/com.example.crystallball.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2328) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.app.ActivityThread.access$900(ActivityThread.java:169) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.os.Handler.dispatchMessage(Handler.java:102) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.os.Looper.loop(Looper.java:136) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.app.ActivityThread.main(ActivityThread.java:5476) 08-17 16:20:25.096: E/AndroidRuntime(20020): at java.lang.reflect.Method.invokeNative(Native Method) 08-17 16:20:25.096: E/AndroidRuntime(20020): at java.lang.reflect.Method.invoke(Method.java:515) 08-17 16:20:25.096: E/AndroidRuntime(20020): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) 08-17 16:20:25.096: E/AndroidRuntime(20020): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) 08-17 16:20:25.096: E/AndroidRuntime(20020): at dalvik.system.NativeStart.main(Native Method) 08-17 16:20:25.096: E/AndroidRuntime(20020): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 08-17 16:20:25.096: E/AndroidRuntime(20020): at com.example.crystallball.MainActivity.onCreate(MainActivity.java:29) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.app.Activity.performCreate(Activity.java:5451) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093) 08-17 16:20:25.096: E/AndroidRuntime(20020): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292) 08-17 16:20:25.096: E/AndroidRuntime(20020): ... 11 more