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, Crystalball has stopped

Hi, I've got this annoying error that's been keeping me busy for at least two hours. Either my emulator won't run my app at all (1) or it will run but it will show an error in the emulator that says: "unfortunately, Crystallball has stopped" (2)

I find the answers that I found on this forum very vague and hopefully someone is able to help me.

Logcat returns this:

05-30 19:35:02.415: W/dalvikvm(1255): threadid=1: thread exiting with uncaught exception (group=0xb2abeba8) 05-30 19:35:02.445: E/AndroidRuntime(1255): FATAL EXCEPTION: main 05-30 19:35:02.445: E/AndroidRuntime(1255): Process: com.example.crystalball, PID: 1255 05-30 19:35:02.445: E/AndroidRuntime(1255): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:107) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 05-30 19:35:02.445: E/AndroidRuntime(1255): at com.example.crystalball.MainActivity.onCreate(MainActivity.java:18) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.app.Activity.performCreate(Activity.java:5231) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.app.ActivityThread.access$800(ActivityThread.java:135) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.os.Handler.dispatchMessage(Handler.java:102) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.os.Looper.loop(Looper.java:136) 05-30 19:35:02.445: E/AndroidRuntime(1255): at android.app.ActivityThread.main(ActivityThread.java:5017) 05-30 19:35:02.445: E/AndroidRuntime(1255): at java.lang.reflect.Method.invokeNative(Native Method) 05-30 19:35:02.445: E/AndroidRuntime(1255): at java.lang.reflect.Method.invoke(Method.java:515) 05-30 19:35:02.445: E/AndroidRuntime(1255): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 05-30 19:35:02.445: E/AndroidRuntime(1255): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 05-30 19:35:02.445: E/AndroidRuntime(1255): at dalvik.system.NativeStart.main(Native Method) 05-30 19:40:03.045: I/Process(1255): Sending signal. PID: 1255 SIG: 9

Since Crystalball is the very first project and I have absolutely no idea what this means let alone how to solve it, I'm in very desprate need of your help.

Thanks!!

4 Answers

honestly, a thousand cookies for the man who solves this. I hate setting up environments &**&#$%^&!

Hey Bas,

You have quite the issue lol.

Apparently it cannot locate your class path. 'java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable 05-30 19:35:02.445:'

This link does a good job at explaining how to resolve this exception.

I hope this helps!

hi Calvin,

Thanks for your quick response. Unfortunately, I have no experience in programming java or Android for that matter. When reading about 'classpaths' I have absolutely no clue what this means or where to look, which is also why this is so frustrating. For now, a solution which looked like 'change XYX to YYY in file YXY.***' would work best for me.

Can you paste you code for MainActivity in here?