我尝试使用 HierarchyViewer 检查布局,但它没有加载。首先,我尝试使用模拟器,但由于它无法正常工作,然后我尝试使用ViewServer
使用模拟器它会静默失败,但使用 ViewServer 我可以获得堆栈跟踪:
W/dalvikvm(459): Unable to match class for part: 'Landroid/view/accessibility/AccessibilityNodeInfo;)V'
W/View(459): Problem dumping the view:
W/View(459): java.lang.NoSuchMethodException
W/View(459): at java.lang.Class.getDeclaredMethods(Native Method)
W/View(459): at java.lang.ClassCache.getDeclaredMethods(ClassCache.java:140)
W/View(459): at java.lang.Class.getDeclaredMethods(Class.java:757)
W/View(459): at android.view.ViewDebug.getExportedPropertyMethods(ViewDebug.java:1331)
W/View(459): at android.view.ViewDebug.exportMethods(ViewDebug.java:1372)
W/View(459): at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:1364)
W/View(459): at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:1354)
W/View(459): at android.view.ViewDebug.dumpViewWithProperties(ViewDebug.java:1270)
W/View(459): at android.view.ViewDebug.dumpViewHierarchyWithProperties(ViewDebug.java:1244)
W/View(459): at android.view.ViewDebug.dumpViewHierarchyWithProperties(ViewDebug.java:1252)
W/View(459): at android.view.ViewDebug.dumpViewHierarchyWithProperties(ViewDebug.java:1252)
W/View(459): at android.view.ViewDebug.dumpViewHierarchyWithProperties(ViewDebug.java:1252)
W/View(459): at android.view.ViewDebug.dumpViewHierarchyWithProperties(ViewDebug.java:1252)
W/View(459): at android.view.ViewDebug.dumpViewHierarchyWithProperties(ViewDebug.java:1252)
W/View(459): at android.view.ViewDebug.dumpViewHierarchyWithProperties(ViewDebug.java:1252)
W/View(459): at android.view.ViewDebug.dumpViewHierarchyWithProperties(ViewDebug.java:1252)
W/View(459): at android.view.ViewDebug.dump(ViewDebug.java:1204)
W/View(459): at android.view.ViewDebug.dispatchCommand(ViewDebug.java:863)
W/View(459): at android.view.ViewRoot$W.executeCommand(ViewRoot.java:3070)
W/View(459): at android.view.IWindow$Stub.onTransact(IWindow.java:65)
W/View(459): at android.os.Binder.execTransact(Binder.java:320)
W/View(459): at dalvik.system.NativeStart.run(Native Method)
关于会发生什么的任何想法?我不知道它是否相关,但该应用程序在 ICS 设备上运行并使用带有 SherlockBar 的支持库