def desired_caps():

    with open("../config/toolkit_caps.yaml", 'r', encoding='utf-8') as f:
        data = yaml.load(f)

    des_caps = {
        'platformName': data['platformName'],
        'platformVersion': data['platformVersion'],
        'deviceName': data['deviceName'],
        'uid': data['uid'],
        'appPackage': data['appPackage'],
        'appActivity': data['appActivity']
    }
    logging.info("============ Start the nio mate app ============")
    print("!!!IS CONNECTING!!!")
    driver = webdriver.Remote("http://" + str(data['ip']) + ":" + str(data['port']) + "/wd/hub", des_caps)
    time.sleep(5)
    print("!!!Connected!!!")
    return driver

上脚本:

配置 capacity

启动 Appium 服务器后,脚本的 console 报错信息如下:

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: Command '/usr/local/android-sdk-macosx/platform-tools/adb -P 5037 -s 634f5ff9 install /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/node_modules/io.appium.settings/bin/settings_apk-debug.apk' exited with code 1{"stdout":"","stderr":"adb: failed to install /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/node_modules/io.appium.settings/bin/settings_apk-debug.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.settings without first uninstalling.]\n","code":1}

我在网上查到的相关信息是 appium 版本与 android 7 系统存在不适配的情况。
请问大佬们有没有碰到过相关问题,和相对应的解决方法呢?

版本号情况:

Appium:v1.5.3
Selenium: 3.141.0
Python: 3.7
Android:7.1.1


↙↙↙阅读原文可查看相关链接,并与作者交流