gpt4 book ai didi

android - 启动布局检查器时为 "Error obtaining view hierarchy: Unexpected error: empty view hierarchy"

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:12:27 27 4
gpt4 key购买 nike

启动布局检查器时收到错误消息:“获取 View 层次结构时出错:意外错误:空 View 层次结构”。

同样在 Logcat 中有一个异常(exception):

12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater I/art: Exception thrown by dispatcher for 0x56555254
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: java.lang.NoClassDefFoundError: android.graphics.drawable.Icon
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.Class.getDexCacheType(Class.java:479)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.reflect.ArtMethod.getDexCacheType(ArtMethod.java:236)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.reflect.ArtMethod.getParameterTypes(ArtMethod.java:176)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.reflect.Method.getParameterTypes(Method.java:174)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.Class.getDeclaredMethods(Class.java:802)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.getExportedPropertyMethods(ViewDebug.java:1118)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.exportMethods(ViewDebug.java:1209)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:1155)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:1141)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpView(ViewDebug.java:1058)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:997)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:992)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.view.ViewDebug.dump(ViewDebug.java:855)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.ddm.DdmHandleViewDebug.dumpHierarchy(DdmHandleViewDebug.java:235)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at android.ddm.DdmHandleViewDebug.handleChunk(DdmHandleViewDebug.java:134)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.graphics.drawable.Icon" on path: DexPathList[[zip file "/data/app/com.tst.nikita.yandextranslater-2/base.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.tst.nikita.yandextranslater-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.tst.nikita.yandextranslater-2/lib/arm, /vendor/lib, /system/lib]]
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: ... 24 more
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: Suppressed: java.lang.ClassNotFoundException: android.graphics.drawable.Icon
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.Class.classForName(Native Method)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
12-10 23:46:56.822 18833-18840/com.tst.nikita.yandextranslater W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
12-10 23:46:56.822 18833-18840/com.tst.nikita.yandextranslater W/System.err: ... 26 more
12-10 23:46:56.822 18833-18840/com.tst.nikita.yandextranslater W/System.err: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

我使用的是 Android Studio 3.0.1。

设备 - 三星 Galaxy S4 GT-I9505,Android 5.0.1。

来自 list 文件:

compileSdkVersion 26
buildToolsVersion '26.0.3'
minSdkVersion 21
targetSdkVersion 26

最佳答案

我注意到使用蓝牙时也会发生这种情况。当我关闭蓝牙以便我的代码停止扫描时,我可以很好地捕获 View 层次结构。

关于android - 启动布局检查器时为 "Error obtaining view hierarchy: Unexpected error: empty view hierarchy",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47743426/

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