严重:构建服务器时出错:io.selendroid.exceptions.ShellCommandException:执行shell命令时出错:

时间:2018-02-12 11:51:38

标签: selendroid

我是Android新手,我想运行这个例子:

https://www.guru99.com/introduction-to-selendroid.html

我面临以下问题:

io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: D:\android-sdksEclipse\Android\Sdk\tools\android.bat list avds
at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:113)
at io.selendroid.server.model.DeviceStore.initAndroidDevices(DeviceStore.java:104)
at io.selendroid.server.model.SelendroidStandaloneDriver.initAndroidDevices(SelendroidStandaloneDriver.java:160)
at io.selendroid.server.model.SelendroidStandaloneDriver.(SelendroidStandaloneDriver.java:83)
at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:61)
at io.selendroid.server.SelendroidStandaloneServer.(SelendroidStandaloneServer.java:50)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:49)
at io.selendroid.SelendroidLauncher.launchSelendroid(SelendroidLauncher.java:73)
at com.guru.test.Guru99Test.setUp(Guru99Test.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:326)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: D:\android-sdksEclipse\Android\Sdk\tools\android.bat list avds
at io.selendroid.io.ShellCommand.exec(ShellCommand.java:49)
at `io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:111)`

......还有27个 引起:io.selendroid.exceptions.ShellCommandException:*************************************** *********************************** " android"命令已弃用。 对于手动SDK,AVD和项目管理,请使用Android Studio。 对于命令行工具,请使用tools \ bin \ sdkmanager.bat 和tools \ bin \ avdmanager.bat

无效或不支持的命令"列出avds"

支持的命令是: android列表目标 android列表avd android列表设备 android创建avd android move avd android删除avd android list sdk android update sdk

......还有29个 FAILED CONFIGURATION:@beforesuite setUp

java.lang.RuntimeException: io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: D:\android-sdksEclipse\Android\Sdk\tools\android.bat list avds
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:60)
at io.selendroid.SelendroidLauncher.launchSelendroid(SelendroidLauncher.java:73)
at com.guru.test.Guru99Test.setUp(Guru99Test.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:326)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: D:\android-sdksEclipse\Android\Sdk\tools\android.bat list avds
at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:113)
at io.selendroid.server.model.DeviceStore.initAndroidDevices(DeviceStore.java:104)
at io.selendroid.server.model.SelendroidStandaloneDriver.initAndroidDevices(SelendroidStandaloneDriver.java:160)
at io.selendroid.server.model.SelendroidStandaloneDriver.(SelendroidStandaloneDriver.java:83)
at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:61)
at io.selendroid.server.SelendroidStandaloneServer.(SelendroidStandaloneServer.java:50)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:49)

...还有21个 引起:io.selendroid.exceptions.ShellCommandException:执行shell命令时出错:D:\ android-sdksEclipse \ Android \ Sdk \ tools \ android.bat list avds 在io.selendroid.io.ShellCommand.exec(ShellCommand.java:49) at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:111) ......还有27个 引起:io.selendroid.exceptions.ShellCommandException:*************************************** *********************************** " android"命令已弃用。 对于手动SDK,AVD和项目管理,请使用Android Studio。 对于命令行工具,请使用tools \ bin \ sdkmanager.bat 和tools \ bin \ avdmanager.bat

无效或不支持的命令"列出avds"

支持的命令是: android列表目标 android列表avd android列表设备 android创建avd android move avd android删除avd android list sdk android update sdk

......还有29个 SKIPPED:selendroidTest

java.lang.RuntimeException: io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: D:\android-sdksEclipse\Android\Sdk\tools\android.bat list avds
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:60)
at io.selendroid.SelendroidLauncher.launchSelendroid(SelendroidLauncher.java:73)
at com.guru.test.Guru99Test.setUp(Guru99Test.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:326)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: D:\android-sdksEclipse\Android\Sdk\tools\android.bat list avds
at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:113)
at io.selendroid.server.model.DeviceStore.initAndroidDevices(DeviceStore.java:104)
at io.selendroid.server.model.SelendroidStandaloneDriver.initAndroidDevices(SelendroidStandaloneDriver.java:160)
at io.selendroid.server.model.SelendroidStandaloneDriver.(SelendroidStandaloneDriver.java:83)
at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:61)
at io.selendroid.server.SelendroidStandaloneServer.(SelendroidStandaloneServer.java:50)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:49)
... 21 more
Caused by: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: D:\android-sdksEclipse\Android\Sdk\tools\android.bat list avds
at io.selendroid.io.ShellCommand.exec(ShellCommand.java:49)
at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:111)

......还有27个 引起:io.selendroid.exceptions.ShellCommandException:*************************************** *********************************** " android"命令已弃用。 对于手动SDK,AVD和项目管理,请使用Android Studio。 对于命令行工具,请使用tools \ bin \ sdkmanager.bat 和tools \ bin \ avdmanager.bat

无效或不支持的命令"列出avds"

支持的命令是: android列表目标 android列表avd android列表设备 android创建avd android move avd android删除avd android list sdk android update sdk

... 29更多

默认测试 测试运行:1,失败:0,跳过:1 配置失败:1,跳过:0

你能帮帮我吗?

0 个答案:

没有答案