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 (retired 2014) Pretty Little Things Adding an Image

Matthew Cahn
Matthew Cahn
6,301 Points

Emulator doesn't work.

So I've been able to use the emulator fine till now. But now the app is crashing in the emulator. I've been using the Nexus S emulator and can't figure out how to get it working.

Stone Preston
Stone Preston
42,016 Points

what error messages, if any, are you getting?

Matthew Cahn
Matthew Cahn
6,301 Points

It just says "Crystal Ball Has Stopped" in the emulator.

Stone Preston
Stone Preston
42,016 Points

but what about in the eclipse output log?

Matthew Cahn
Matthew Cahn
6,301 Points

Actually Just Found the Log my guess is it's the fatal exception but I'm way out of my depth:

04-06 18:42:15.850: D/dalvikvm(793): Not late-enabling CheckJNI (already on) 04-06 18:42:18.470: D/AndroidRuntime(793): Shutting down VM 04-06 18:42:18.470: W/dalvikvm(793): threadid=1: thread exiting with uncaught exception (group=0xb3aeaba8) 04-06 18:42:18.480: E/AndroidRuntime(793): FATAL EXCEPTION: main 04-06 18:42:18.480: E/AndroidRuntime(793): Process: com.example.crystalball, PID: 793 04-06 18:42:18.480: E/AndroidRuntime(793): 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. 04-06 18:42:18.480: E/AndroidRuntime(793): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.app.ActivityThread.access$800(ActivityThread.java:135) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.os.Handler.dispatchMessage(Handler.java:102) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.os.Looper.loop(Looper.java:136) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.app.ActivityThread.main(ActivityThread.java:5017) 04-06 18:42:18.480: E/AndroidRuntime(793): at java.lang.reflect.Method.invokeNative(Native Method) 04-06 18:42:18.480: E/AndroidRuntime(793): at java.lang.reflect.Method.invoke(Method.java:515) 04-06 18:42:18.480: E/AndroidRuntime(793): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 04-06 18:42:18.480: E/AndroidRuntime(793): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 04-06 18:42:18.480: E/AndroidRuntime(793): at dalvik.system.NativeStart.main(Native Method) 04-06 18:42:18.480: E/AndroidRuntime(793): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 04-06 18:42:18.480: E/AndroidRuntime(793): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 04-06 18:42:18.480: E/AndroidRuntime(793): at com.example.crystalball.MainActivity.onCreate(MainActivity.java:17) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.app.Activity.performCreate(Activity.java:5231) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 04-06 18:42:18.480: E/AndroidRuntime(793): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 04-06 18:42:18.480: E/AndroidRuntime(793): ... 11 more

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

You've run into a very unfortunate issue that is a result of updated Android tools. I just added notes in the Teacher's Notes on that video page, and also check out this related Forum post:

https://teamtreehouse.com/forum/you-need-to-use-a-themeappcompat-theme-or-descendent-crystal-ball-crashes