|
1.在确保adb成功连接后
2.检查android系统版本
android 5.0以下版本的swipe命令应该没有duration 这个参数。可使用cmd 确认,检查swipe 是否有 duration 这个参数:
adb shell input swipe -h
若没有则去掉这个参数,只保留start point(x,y) 和 end point(x,y)
usage: input ... input text <string> input keyevent <key code number or name> input [touchscreen|touchpad|touchnavigation] tap <x> <y> input [touchscreen|touchpad|touchnavigation] swipe <x1> <y1> <x2> <y2> [duration(ms)] input trackball press input trackball roll <dx> <dy>
|