Hi all I am getting a exception while working with support lib. I know lot of question and answer are available in SO but no one work for me
11-27 11:58:15.470: E/AndroidRuntime(19609): FATAL EXCEPTION: main
11-27 11:58:15.470: E/AndroidRuntime(19609): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:147)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.support.v7.app.ActionBarActivityDelegateBase.onCreate(ActionBarActivityDelegateBase.java:138)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:123)
11-27 11:58:15.470: E/AndroidRuntime(19609): at com.devicemonitor.DeviceMonitorActivity.onCreate(DeviceMonitorActivity.java:29)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.app.Activity.performCreate(Activity.java:5104)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.app.ActivityThread.access$600(ActivityThread.java:141)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.os.Handler.dispatchMessage(Handler.java:99)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.os.Looper.loop(Looper.java:137)
11-27 11:58:15.470: E/AndroidRuntime(19609): at android.app.ActivityThread.main(ActivityThread.java:5041)
11-27 11:58:15.470: E/AndroidRuntime(19609): at java.lang.reflect.Method.invokeNative(Native Method)
11-27 11:58:15.470: E/AndroidRuntime(19609): at java.lang.reflect.Method.invoke(Method.java:511)
11-27 11:58:15.470: E/AndroidRuntime(19609): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
11-27 11:58:15.470: E/AndroidRuntime(19609): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
11-27 11:58:15.470: E/AndroidRuntime(19609): at dalvik.system.NativeStart.main(Native Method)
What i have did is like this - I have android-support-v7-appcompat.jar as well as android-support-v4.jar in android java build path.
In some answer in SO suggested that unchecked Android dependencies in java build path i tried it also but nothing is working for me.
In my gen folder there are two package one for goole-play-service-lib and another for my project , and in my project package under gen folder only trwo file is there R.java and BuildCOnfig.java. Anybody have any suggestion please suggest me
Import the support.v7.appcompat as a library project in your workspace and attach it with your project.
Try this,it will work for sure. if you still face any issue, do comment.
You have to just delete your appcompat and re-import it to eclipse and change its android built property to highest api configuration. Clean your project, copy-paste R file in gen package and change project build path to highest api level like api-21.
This will solve your problem.
In "android-support-v7-appcompat" project:
-Delete “android-support-v7-appcompat” from Package explorer.
-Import again and check “Copy into workspace”
-In Properties -> Android -> in Project build target, uncheck Android 2.2 and check Android 4.1.2
-In Java build path, uncheck if you have any .jar library, and uncheck the Dependence
and finally this is what you need to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With