【Appium】Original error: Could not find 'adb.exe' in PATH. 解决办法

通过客户端访问Appium服务端时,提示:Original error: Could not find 'adb.exe' in PATH. 让检查ANDROID_HOME是否正确配置。

DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability(CapabilityType.BROWSER_NAME, "");//这句不是必须的
        capabilities.setCapability("deviceName","9JB02321");
        capabilities.setCapability("platformVersion", "10");
        capabilities.setCapability("platformName","Android");
        capabilities.setCapability("appPackage", "com.android.calculator2");
        capabilities.setCapability("appActivity", ".Calculator");
        AppiumDriver driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

网上有说让检查JDK配置的,有让命令行启动的。

最终解决办法:使用管理员权限启动Appium,问题解决

 

你可能感兴趣的:(JAVA)