When Extending AppcompatActivity in eclipse its crashing my application

I am using support library android-support-v7-appcompat but when i extend AppCompatActvity or ActionBarActivity it crashes my app and show these errors.

So please tell me how to resolve this issue in my app.

Here’s my logcat

10-13 13:37:36.879: E/AndroidRuntime(20329): FATAL EXCEPTION: main
10-13 13:37:36.879: E/AndroidRuntime(20329): Process: com.example.trackme, PID: 20329
10-13 13:37:36.879: E/AndroidRuntime(20329): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.trackme/com.example.trackme.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.trackme.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.trackme-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.trackme-2, /vendor/lib, /system/lib]]
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2264)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.app.ActivityThread.access$800(ActivityThread.java:151)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.os.Handler.dispatchMessage(Handler.java:110)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.os.Looper.loop(Looper.java:193)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.app.ActivityThread.main(ActivityThread.java:5292)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at java.lang.reflect.Method.invokeNative(Native Method)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at java.lang.reflect.Method.invoke(Method.java:515)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at dalvik.system.NativeStart.main(Native Method)
10-13 13:37:36.879: E/AndroidRuntime(20329): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.trackme.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.trackme-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.trackme-2, /vendor/lib, /system/lib]]
10-13 13:37:36.879: E/AndroidRuntime(20329):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
10-13 13:37:36.879: E/AndroidRuntime(20329):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255)
10-13 13:37:36.879: E/AndroidRuntime(20329): 


Source: eclipse

Leave a Reply