Error when using onCreate () when using AppCompactActivity

I have updated my SDK to 22 (Android 5.1.1). Then I used AppCompactActivity instead of Activity. Here is the logcat output.

04-23 13:51:40.524: E/AndroidRuntime(3150): java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV11
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:77)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:414)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:57)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at com.emapps.easystudy.StartActivity.onCreate(StartActivity.java:61)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.app.Activity.performCreate(Activity.java:5451)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2377)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.app.ActivityThread.access$900(ActivityThread.java:175)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.os.Handler.dispatchMessage(Handler.java:102)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.os.Looper.loop(Looper.java:146)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at android.app.ActivityThread.main(ActivityThread.java:5602)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at java.lang.reflect.Method.invokeNative(Native Method)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at java.lang.reflect.Method.invoke(Method.java:515)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
04-23 13:51:40.524: E/AndroidRuntime(3150):     at dalvik.system.NativeStart.main(Native Method)

      

+3


source to share


3 answers


I've tried this:

a) Launched eclipse.

b) Removed all .jar files in libs / folder. (If you have android-v4.jar support or any other lib files)



c) Also checked for a Stack Overflow message by Chris Banes

d) Clean the assembly

+1


source


I have the same problem and update all support library to the latest version (including android-support-v13.jar). It will work fine.



0


source


I fixed it:

right click android progect ---> Android tools ---> add libary support ...---> download latest android support.

0


source







All Articles