C:\Guru99>java -jar selendroid-standalone-0.11.0-with-dependencies.jar
################# Selendroid #################
################# Configuration in use #################
io.selendroid.SelendroidConfiguration@13221655[
port=4444
timeoutEmulatorStart=300000
supportedApps=[]
verbose=false
emulatorPort=5560
deviceScreenshot=false
selendroidServerPort=8080
keystore=<null>
emulatorOptions=<null>
registrationUrl=<null>
proxy=<null>
serverHost=<null>
keepAdbAlive=false
noWebViewApp=false
noClearData=false
sessionTimeoutSeconds=1800
forceReinstall=false
logLevel=ERROR
]
Jan 15, 2018 11:36:26 AM io.selendroid.SelendroidLauncher launchServer
INFO: Starting selendroid-server port 4444
Jan 15, 2018 11:36:26 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Users\ceinfo\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt.exe remove C:\Users\ceinfo\AppData\Local\Temp\android-driver356317634035924213.apk META-INF/MANIFEST.MF
Jan 15, 2018 11:36:27 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Users\ceinfo\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt.exe remove C:\Users\ceinfo\AppData\Local\Temp\android-driver356317634035924213.apk META-INF/CERT.RSA
Jan 15, 2018 11:36:27 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Users\ceinfo\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt.exe remove C:\Users\ceinfo\AppData\Local\Temp\android-driver356317634035924213.apk META-INF/CERT.SF
Jan 15, 2018 11:36:27 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Users\ceinfo\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt.exe remove C:\Users\ceinfo\AppData\Local\Temp\android-driver356317634035924213.apk META-INF/ANDROIDD.SF
Jan 15, 2018 11:36:27 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Users\ceinfo\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt.exe remove C:\Users\ceinfo\AppData\Local\Temp\android-driver356317634035924213.apk META-INF/ANDROIDD.RSA
Jan 15, 2018 11:36:27 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Users\ceinfo\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt.exe remove C:\Users\ceinfo\AppData\Local\Temp\android-driver356317634035924213.apk META-INF/NDKEYSTO.SF
Jan 15, 2018 11:36:27 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Users\ceinfo\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt.exe remove C:\Users\ceinfo\AppData\Local\Temp\android-driver356317634035924213.apk META-INF/NDKEYSTO.RSA
Jan 15, 2018 11:36:28 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Java\jdk1.8.0_151\bin\jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar C:\Users\ceinfo\AppData\Local\Temp\resigned-android-driver356317634035924213.apk -storepass android -keystore C:\Users\ceinfo\.android\debug.keystore C:\Users\ceinfo\AppData\Local\Temp\android-driver356317634035924213.apk androiddebugkey
Jan 15, 2018 11:36:28 AM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: App signing output: jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2048-01-01) or after any future revocation date.
Jan 15, 2018 11:36:28 AM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: The app has been signed: C:\Users\ceinfo\AppData\Local\Temp\resigned-android-driver356317634035924213.apk
Jan 15, 2018 11:36:31 AM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Users\ceinfo\AppData\Local\Android\Sdk\tools\android.bat list avds
Jan 15, 2018 11:36:31 AM io.selendroid.SelendroidLauncher launchServer
SEVERE: Error occurred while building server: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\Users\ceinfo\AppData\Local\Android\Sdk\tools\android.bat list avds
io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\Users\ceinfo\AppData\Local\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.<init>(SelendroidStandaloneDriver.java:83)
at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:61)
at io.selendroid.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:50)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:49)
at io.selendroid.SelendroidLauncher.main(SelendroidLauncher.java:105)
Caused by: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\Users\ceinfo\AppData\Local\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)
... 7 more
Caused by: io.selendroid.exceptions.ShellCommandException: **************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************
Invalid or unsupported command "list avds"
Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
... 9 more
Exception in thread "main" java.lang.RuntimeException: io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\Users\ceinfo\AppData\Local\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.main(SelendroidLauncher.java:105)
Caused by: io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\Users\ceinfo\AppData\Local\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.<init>(SelendroidStandaloneDriver.java:83)
at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:61)
at io.selendroid.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:50)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:49)
... 1 more
Caused by: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\Users\ceinfo\AppData\Local\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)
... 7 more
Caused by: io.selendroid.exceptions.ShellCommandException: **************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************
Invalid or unsupported command "list avds"
Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
... 9 more
当我想在我的系统上运行selendroid时,它没有运行,它没有获取任何sdk相关信息。在端口4444上运行selendroid有一些错误。我几乎看到每个帖子但是没有满意的答案,他们与这个问题无关,我使用的是selendroid依赖jar文件版本0.11.0和android studio 2.3.3 < / p>
答案 0 :(得分:0)
降级到支持所有android cmds的旧版android sdk =>使用旧版Android Studio,旧版Gradle和旧版AndroidSDK的更多风险/错误
答案 1 :(得分:-1)
更改SelendroidStandaloneServer代码以适应新的android cmds: 将shellcmd android list avds更改为android list avd
io.selendroid.standalone.android.impl.DefaultAndroidEmulator的第148行
CommandLine cmd = new CommandLine(AndroidSdk.android());
cmd.addArgument("list", false);
//cmd.addArgument("avds", false);
cmd.addArgument("avd", false);
再次在androidstudio上重建selendroid,然后运行SelendroidStandaloneServer。