运行 一个 Android 应用程序通过自动化测试时出错

Error while running a Android App through Automation Testing

当我构建我的应用程序时,它显示测试服务器已创建,但是当我 运行 一个应用程序时,它显示我在下面提到的以下错误。有关详细信息,我已附上屏幕截图,请参考。

enter image description here

场景:然后我看到"Hello World!"#features/my_first.feature:3 连接了一台以上的设备。使用 ADB_DEVICE_ARG 指定设备序列号(Ru ntimeError) ./features/support/app_installation_hooks.rb:18:在Before' App did not start (RuntimeError) ./features/support/app_life_cycle_hooks.rb:5:in之前' 失败场景: cucumber features/my_first.feature:3 # 场景:然后我看到 "Hello World!" 1 个场景(1 个失败) 0 步 0m17.546s

请帮我解决问题。

这是说您有不止一个 android 设备(真实的或模拟的)连接到机器。 Calabash 使用 adb 与设备通信,如果连接了多个设备,adb 需要知道要与哪个设备通信。断开您不想使用的设备,或将设备序列号设置为 ADB_DEVICE_ARG.

的环境变量

您可以通过命令行找到您设备的序列号

adb devices