Fatal Exception: java.lang.NoClassDefFoundError

I have ViewDebug issue in some devices with Android OS 4.4.4. I use vector icon in my app. From fatal exeption description I don`t understand why it happened.

Crash:

Fatal Exception: java.lang.NoClassDefFoundError: android/graphics/drawable/Icon
   at java.lang.Class.getDeclaredMethods(Class.java)
   at java.lang.Class.getDeclaredMethods(Class.java:656)
   at android.view.ViewDebug.getExportedPropertyMethods(ViewDebug.java:960)
   at android.view.ViewDebug.exportMethods(ViewDebug.java:1047)
   at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:997)
   at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:983)
   at android.view.ViewDebug.dumpView(ViewDebug.java:900)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:870)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dump(ViewDebug.java:793)
   at android.view.ViewDebug.dispatchCommand(ViewDebug.java:416)
   at android.view.ViewRootImpl$W.executeCommand(ViewRootImpl.java:6258)
   at android.view.IWindow$Stub.onTransact(IWindow.java:65)
   at android.os.Binder.execTransact(Binder.java:404)
   at dalvik.system.NativeStart.run(NativeStart.java)
Caused by java.lang.ClassNotFoundException: Didn't find class "android.graphics.drawable.Icon" on path: DexPathList[[zip file "/data/app/com.minvideo.android-1.apk", zip file "/data/data/com.minvideo.android/code_cache/secondary-dexes/com.minvideo.android-1.apk.classes2.zip"],nativeLibraryDirectories=[/data/app-lib/com.minvideo.android-1, /vendor/lib, /system/lib]]
   at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
   at java.lang.Class.getDeclaredMethods(Class.java)
   at java.lang.Class.getDeclaredMethods(Class.java:656)
   at android.view.ViewDebug.getExportedPropertyMethods(ViewDebug.java:960)
   at android.view.ViewDebug.exportMethods(ViewDebug.java:1047)
   at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:997)
   at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:983)
   at android.view.ViewDebug.dumpView(ViewDebug.java:900)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:870)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
   at android.view.ViewDebug.dump(ViewDebug.java:793)
   at android.view.ViewDebug.dispatchCommand(ViewDebug.java:416)
   at android.view.ViewRootImpl$W.executeCommand(ViewRootImpl.java:6258)
   at android.view.IWindow$Stub.onTransact(IWindow.java:65)
   at android.os.Binder.execTransact(Binder.java:404)
   at dalvik.system.NativeStart.run(NativeStart.java)

Please, help me fix this crash, I don`t understand why i have it.

Upvotes: 3

Views: 1226

Answers (1)

Sathish Gadde
Sathish Gadde

Reputation: 1623

Am faced same issue, fortunately it is fixed in latest released support library..

inside of app level .gradle update library as latest version :

dependencies {
    compile 'com.android.support:appcompat-v7:27.0.0'
}

Upvotes: 1

Related Questions