无法在 Windows 中为 android 模拟器连接 appium 检查器

Posted

技术标签:

【中文标题】无法在 Windows 中为 android 模拟器连接 appium 检查器【英文标题】:Couldn't able to connect appium inspector for android emulator in windows 【发布时间】:2021-12-27 20:21:46 【问题描述】:

无法连接 Android 模拟器的 appium 检查器:

Desire Capabilities
    
      "platformName": "android",
      "appium:platformVersion": "11.0",
      "appium:deviceName": "Pixel4",
      "appium:app": "C:\\Users\\prasad.sangpal\\Desktop\\ApiDemos.apk",
      "appium:appPackage": "io.appium.android.apis",
      "appium:appActivity": ".view.TextFields",
      "appium:automationName": "UiAutomator2"
    

Remote Port: 4723 | Remote Host: 0.0.0.0
Error: 
Could not connect to server; are you sure it's running? If you are using the browser version, also ensure your Appium server has been started with --allow-cors.

【问题讨论】:

【参考方案1】:
    在启动 uiautomatorviewer 之前关闭 Appium 服务器 检查您的环境变量和路径。 您可以使用终端打开检查器。

【讨论】:

以上是关于无法在 Windows 中为 android 模拟器连接 appium 检查器的主要内容,如果未能解决你的问题,请参考以下文章