0

我在 Windows 7 中使用 Appium 版本 1.4.16,

当我尝试将 Android 与 OS 7.1 连接时出现以下错误,

 A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c "C:\Users\Devendran\Downloads\Android_SDK\platform-tools\adb.exe -s 84B7N16411007687 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk""
Failed to install C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.settings without first uninstalling.]
) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 19.02 seconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'Wipro-Laptop', ip: '192.168.0.230', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_05'
Driver info: io.appium.java_client.android.AndroidDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
    at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:36)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:114)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:132)
    at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:92)
    at StartApplication.main(StartApplication.java:42)
Exception in thread "main" java.lang.NullPointerException
    at StartApplication.main(StartApplication.java:65)

任何人都可以在这里帮忙。

4

1 回答 1

1

这是由最近修复的旧错误引起的。您需要做的,是将 Appium 更新到最新版本并重新启动服务器。

此处的说明:https ://github.com/appium/appium/issues/6665#issuecomment-254269722

于 2017-02-06T19:28:25.557 回答