致命异常:java.lang.NoClassDefFoundError:android / view / ViewStructure

时间:2017-12-04 09:31:33

标签: android performance android-layout android-support-library

我正在为Android OS构建社区目录应用程序。 它正在运行很好的Lollipop转发设备。应用程序已经有一段时间了 在Android OS 4.4版本中崩溃。下面提到的错误日志:

# Platform: android
# Date: 2017-12-04T08:33:00Z
# OS Version: 4.4.2
# Device: Galaxy S5
# RAM Free: 63.1%
# Disk Free: 69.3%

Fatal Exception: java.lang.NoClassDefFoundError: android/view/ViewStructure
Caused by java.lang.ClassNotFoundException: Didn't find class 
"android.view.ViewStructure" on path: DexPathList[[zip file 
"/data/app/com.blacksmithyouthclub-1.apk", zip file 
"/data/data/com.blacksmithyouthclub/code_cache/secondary-
dexes/com.blacksmithyouthclub-1.apk.classes2.zip"],nativeLibraryDirectories=
[/data/app-lib/com.blacksmithyouthclub-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:855)
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.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)

2 个答案:

答案 0 :(得分:0)

  

ViewDebug.getExportedPropertyMethods()只应在以下情况下发生   hierarchyviewer / ddm已连接。这不是用户崩溃。

Check here

答案 1 :(得分:-3)

Try it to update support library 27.0.0

Android Gradle Plugin 3.x:

implementation 'com.android.support:appcompat-v7:27.1.0' 
implementation 'com.android.support:support-v4:27.1.0'

Android Gradle Plugin 2.x:

compile 'com.android.support:appcompat-v7:27.1.0'

compile 'com.android.support:support-v4:27.0.0'

同时将compileSdkVersion更新为27。