gpt4 book ai didi

android - ClassNotFound : android. view.ViewStructure with Support Library 26.0.2 - 27.0.0

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:58:53 25 4
gpt4 key购买 nike

我看到三星 Galaxy S5 和 Android 4.4.2 崩溃

NoClassDefFoundError: android/view/ViewStructure

自从我将支持库更新到 26.0.2 以来,这种情况一直在发生。现在它也在 27.0.0 上发生,尽管我预计此类问题已在其中得到解决。在将应用程序提交到 Google Play 后不久,我在 Crashlytics 中看到一次崩溃(我正在向一小部分用户推出)。我不知道重现的确切步骤是什么。到目前为止,我假设它可能是应用程序启动的时间。

相关报道:

java.lang.NoClassDefFoundError: android/graphics/drawable/Icon

ViewDebug.getExportedPropertyMethods java.lang.NoClassDefFound android/graphics/drawable/Icon

我正在使用支持库 27.0.0、compileSdkVersion 27、targetSdkVersion 25、buildToolsVersion '26.0.2'、android 插件 2.3.3、gradle 3.3、Android Studio 3.0。 (我猜这个问题与旧版本的 gradle 和插件无关?...)

我可以看到在支持库中使用了 ViewStructure:

android.support.design.widget.TextInputLayout 
android.support.design.testutils.ViewStructureImpl

但是,我没有在项目的任何地方使用 ViewStructure。

Fatal Exception: java.lang.NoClassDefFoundError: android/view/ViewStructure
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.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.view.ViewStructure" on path: DexPathList[[zip file "/data/app/package.name-1.apk"],nativeLibraryDirectories=[/data/app-lib/package.name-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.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)

最佳答案

导致此问题的最可能原因是用户不是普通用户,因为这“只有在连接了 hierarchyviewer/ddm 时才会发生。”

更多信息可以在这里找到:

https://issuetracker.google.com/issues/68796830

关于android - ClassNotFound : android. view.ViewStructure with Support Library 26.0.2 - 27.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47073632/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com