Search code examples
androidandroid-holo-everywhere

Get NoClassDefFoundError org.holoeverywhere.app.Activity since Update Support Library v4 r13


I've a project with HoloEverywhere, it was working fine last week. After Google I/O, there was a new version of ADT, SDK and Support Library v4. I Proceed to Update those elements. Also, updated HoloEverywhere from GitHub master sources.

Since that, my app doesn't work, every time I run (or debug) the project, it always crash at start, and this is the error:

java.lang.NoClassDefFoundError: org.holoeverywhere.app.Activity at org.holoeverywhere.addon.AddonSherlock.(AddonSherlock.java:236)

Here is the complete stack:

FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: org.holoeverywhere.app.Activity
    at org.holoeverywhere.addon.AddonSherlock.<init>(AddonSherlock.java:236)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1409)
    at org.holoeverywhere.addon.IAddon.addon(IAddon.java:30)
    at org.holoeverywhere.addon.IAddon.obtain(IAddon.java:58)
    at org.holoeverywhere.addon.IAddonBasicAttacher.addon(IAddonBasicAttacher.java:49)
    at org.holoeverywhere.addon.IAddonBasicAttacher.addon(IAddonBasicAttacher.java:65)
    at org.holoeverywhere.app.Application.addon(Application.java:67)
    at org.holoeverywhere.app.Application.onCreate(Application.java:127)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3272)
    at android.app.ActivityThread.access$2200(ActivityThread.java:117)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:969)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:3683)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)

This is my environment configuration:

  • Eclipse 4.2.2 (Juno) (Build id: M20130204-1200)
  • ADT v22 (22.0.0.v201305140200--675183)
  • Android SDK Tools r22
  • Android SDK Platform-tools r17
  • Android SDK Build-tools r17 (aka "new android build tools").

Solution

  • To solve this situation, I tried the answer in this link: java.lang.ClassNotFoundException after changing nothing in the project but upgrading eclipse android sdk

    Thanks to @Raghunandan comment!