我正在从我的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]" />
答案 0 :(得分:0)
很简单,如果没有显示文字,因为使用UiAutomatorViewer
无法检测到的语言。您可以使用其他位置策略,例如className
,Index
...