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

First Crystal Ball App Tutorial

The app crashes everytime. Here is my logcat, any ideas?

08-17 22:21:33.541: W/dalvikvm(1167): VFY: unable to resolve static field 1559 (ActionBarWindow) in Landroid/support/v7/appcompat/R$styleable;
08-17 22:21:33.541: D/dalvikvm(1167): VFY: replacing opcode 0x62 at 0x0004
08-17 22:21:33.551: D/AndroidRuntime(1167): Shutting down VM
08-17 22:21:33.551: W/dalvikvm(1167): threadid=1: thread exiting with uncaught exception (group=0xb3a2cba8)
08-17 22:21:33.601: E/AndroidRuntime(1167): FATAL EXCEPTION: main
08-17 22:21:33.601: E/AndroidRuntime(1167): Process: com.example.crystalball, PID: 1167
08-17 22:21:33.601: E/AndroidRuntime(1167): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:107)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at com.example.crystalball.MainActivity.onCreate(MainActivity.java:18)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.app.Activity.performCreate(Activity.java:5231)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.app.ActivityThread.access$800(ActivityThread.java:135)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.os.Handler.dispatchMessage(Handler.java:102)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.os.Looper.loop(Looper.java:136)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at android.app.ActivityThread.main(ActivityThread.java:5017)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at java.lang.reflect.Method.invokeNative(Native Method)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at java.lang.reflect.Method.invoke(Method.java:515)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
08-17 22:21:33.601: E/AndroidRuntime(1167):     at dalvik.system.NativeStart.main(Native Method)
08-17 22:21:40.861: I/Process(1167): Sending signal. PID: 1167 SIG: 9

2 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

I just published a new version of this course that will hopefully be a smoother, more enjoyable process. Check it out! It covers a lot of the same material, so don't feel pressured to work on both.

It can be tough to decipher an error from logcat for the first few months of Android development.

The line that gives the problem away is:

java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable

Try to follow some of the solutions from this stack overflow question.

http://stackoverflow.com/questions/20900832/java-lang-noclassdeffounderror-android-support-v7-appcompat-rstyleable

I will give that a try, thanks for the quick response!