Appium android4.4.2 使用 uiautoviewer 截屏报错

careysucci · 2014年09月29日 · 最后由 gogily.liu 回复于 2014年10月09日 · 1536 次阅读

1、正常启动后,使用 uiautomatorviewer 没有问题
2、由于要使用 uiautomator,每次启动 uiautomator 服务后再使用 uiautomatorviewer 就会图片错误,启动 uiautomator 服务的步骤如下:
1、Download jar files from uiautomator jsonrpc server.
2、Adb push the downloaded jar files to /data/local/tmp/
3、Start jsonrpc server via command:
adb shell uiautomator runtest bundle.jar uiautomator-stub.jar -c com.github.uiautomatorstub.Stub
4、Adb forward local port to device port:
adb forward tcp:9008 tcp:9008
5、Check if jsonrpc server is ok:
curl -d '{"jsonrpc":"2.0","method":"deviceInfo","id":1}' localhost:9008/jsonrpc/0
把 uiautomator jsonrpc 服务停了以后又可以使用 uiautomatorviewer 了,遂请问有没有什么办法可以两者一起使用?谢谢

共收到 1 条回复 时间 点赞

你确定你的 adb 是连接正常,用命令 “adb devices” 看一下你的设备:
C:\Users\gjliu>adb devices
List of devices attached
03ae7266093c80ba device

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册