Android app closes as soon as it loads (NoClassDefFoundError)

I installed the Android SDK all right, I installed the USB drivers of my Motorola Moto G. It's all right, so much so that when I run the application directly from Eclipse, it finds my device connected. USB debugging is enabled.

Only when I squeegee the application, and Eclipse does the installation of .apk, my device, when opening the application, instantly displays "My App has stopped".

I've tried everything and I can't get it to run. I want to run on my handset Why is Android KitKat and why the AVD is kind of slow at times.

Logcat displays this when I run the application on the device:

04-28 22:27:07.680: W/dalvikvm(13905): VFY: unable to resolve static field 1630 (ActionBarWindow) in Landroid/support/v7/appcompat/R$styleable;
04-28 22:27:07.681: D/dalvikvm(13905): VFY: replacing opcode 0x62 at 0x0004
04-28 22:27:07.682: D/AndroidRuntime(13905): Shutting down VM
04-28 22:27:07.682: W/dalvikvm(13905): threadid=1: thread exiting with uncaught exception (group=0x41ef5d40)
04-28 22:27:07.684: E/AndroidRuntime(13905): FATAL EXCEPTION: main
04-28 22:27:07.684: E/AndroidRuntime(13905): Process: com.example.myfirstapp, PID: 13905
04-28 22:27:07.684: E/AndroidRuntime(13905): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:104)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at com.example.myfirstapp.MainActivity.onCreate(MainActivity.java:18)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.app.Activity.performCreate(Activity.java:5248)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2173)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.app.ActivityThread.access$800(ActivityThread.java:139)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.os.Handler.dispatchMessage(Handler.java:102)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.os.Looper.loop(Looper.java:136)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at android.app.ActivityThread.main(ActivityThread.java:5102)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at java.lang.reflect.Method.invokeNative(Native Method)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at java.lang.reflect.Method.invoke(Method.java:515)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
04-28 22:27:07.684: E/AndroidRuntime(13905):    at dalvik.system.NativeStart.main(Native Method)
Author: bfavaretto, 2014-04-29

1 answers

Solved the problem.

I added in AndroidManifest.xml the line

<library android:name="C:\dev\android\workspace\appcompat_v7\bin\appcompat_v7.jar" />

The application ran successfully. :)

 2
Author: Andrey Luiz, 2014-04-29 01:45:34