-1

我正在从我的 HTC One(M7)-Android 5.02 截屏,在 uiautomatorviewer 的文本字段中看不到值。我在 Android SDK 上使用最新版本。在包含俄语的任何应用程序中出现此错误。

text="????????? ? ???"

UiAutomatorViewer 生成的代码示例:

<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><hierarchy rotation="0"><node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="ru.fns.billchecker" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1080,1920]"><node index="0" text="" resource-id="ru.fns.billchecker:id/drawer_layout" class="android.support.v4.widget.DrawerLayout" package="ru.fns.billchecker" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1080,1920]"><node index="0" text="" resource-id="" class="android.widget.RelativeLayout" package="ru.fns.billchecker" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1080,1920]"><node index="0" text="" resource-id="" class="android.widget.ImageButton" package="ru.fns.billchecker" content-desc="Open navigation drawer" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,75][168,243]" /><node index="1" text="????????? ? ???" resource-id="" class="android.widget.TextView" package="ru.fns.billchecker" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[216,118][734,199]" />

短屏幕

4

1 回答 1

0

这很简单,如果没有显示文本,因为在语言中无法检测到 UiAutomatorViewer. 您可以使用其他位置策略,例如classNameIndex...

于 2017-09-02T12:55:16.880 回答