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 trialNatansh Pandya
2,810 Pointsunfortunately crystal ball has stopped.
After adding the image. it says unfortunately crystal ball has stopped. when we try to run.
3 Answers
Nick Edwards
Courses Plus Student 15,766 PointsHi Natansh,
Could you post the contents from your MainActivity.java, activity_main.xml and the LogCat error log? (At the bottom there should be a tab which says LogCat).
Don't forget to use Markdown below to format your code so it's easier for us to read :)
gary franklin
12,309 Points06-19 15:30:26.194: D/AndroidRuntime(1438): Shutting down VM 06-19 15:30:26.194: W/dalvikvm(1438): threadid=1: thread exiting with uncaught exception (group=0xb1a27ba8) 06-19 15:30:26.224: E/AndroidRuntime(1438): FATAL EXCEPTION: main 06-19 15:30:26.224: E/AndroidRuntime(1438): Process: com.example.crystalball, PID: 1438 06-19 15:30:26.224: E/AndroidRuntime(1438): 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. 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.app.ActivityThread.access$800(ActivityThread.java:135) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.os.Handler.dispatchMessage(Handler.java:102) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.os.Looper.loop(Looper.java:136) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.app.ActivityThread.main(ActivityThread.java:5017) 06-19 15:30:26.224: E/AndroidRuntime(1438): at java.lang.reflect.Method.invokeNative(Native Method) 06-19 15:30:26.224: E/AndroidRuntime(1438): at java.lang.reflect.Method.invoke(Method.java:515) 06-19 15:30:26.224: E/AndroidRuntime(1438): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 06-19 15:30:26.224: E/AndroidRuntime(1438): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 06-19 15:30:26.224: E/AndroidRuntime(1438): at dalvik.system.NativeStart.main(Native Method) 06-19 15:30:26.224: E/AndroidRuntime(1438): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:108) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 06-19 15:30:26.224: E/AndroidRuntime(1438): at com.example.crystalball.MainActivity.onCreate(MainActivity.java:16) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.app.Activity.performCreate(Activity.java:5231) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 06-19 15:30:26.224: E/AndroidRuntime(1438): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 06-19 15:30:26.224: E/AndroidRuntime(1438): ... 11 more 06-19 15:30:35.444: I/Process(1438): Sending signal. PID: 1438 SIG: 9
gary franklin
12,309 PointsI get the same error above is the log I get