【问题标题】:uiautomator version is not detected未检测到 uiautomator 版本
【发布时间】:2018-04-18 12:34:26
【问题描述】:

我的电脑上安装了 uiautomator 版本 2。 但是当 appium 服务器在命令下运行时

adb -s b133582d shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg io.ionic.starter -e disableAndroidWatchers false

它返回如下警告:

此版本的 UI Automator 已弃用。新的测试应该使用 UI Automator 2.0 作为 Android 测试支持库的一部分提供。 见https://developer.android.com/training/testing/ui-testing/uiautomator-testing.html 了解更多详情。

我该如何解决这个问题?

【问题讨论】:

    标签: android-uiautomator appium-android


    【解决方案1】:

    首先,更新android sdk工具,查看详情here

    其次,重新安装appium:

    npm uninstall -g appium
    npm install -g appium
    

    第三,安装appium-doctor并运行环境设置检查:

    npm install appium-doctor -g
    appium-doctor --android
    

    如果您遇到任何错误,请修复它们。否则,请重新开始测试

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-01
      • 2017-02-17
      相关资源
      最近更新 更多