我正在尝试在系统中设置Selendroid。 我已经设置了ANDROID_HOME,JAVA_HOME并安装了android虚拟设备。

C:\Users\sai>echo %ANDROID_HOME%
C:\Android\android-sdk

C:\Users\sai>echo %JAVA_HOME%
C:\Java\jdk1.6.0_26

C:\Android\android-sdk\tools>android.bat list avds
Available Android Virtual Devices:
    Name: SelendroidAVD
  Device: Nexus S (Google)
    Path: C:\Users\sai\.android\avd\SelendroidAVD.avd
  Target: Android 2.3.3 (API level 10)
 Tag/ABI: default/armeabi
    Skin: 480x800

当我尝试使用以下命令启动服务器时,出现了Selendroid异常。

java -jar selendroid-standalone-0.12.0-with-dependencies.jar -aut selendroid
-test-app-0.12.0.apk

apk文件已成功安装,但无法识别Android AVD,并引发以下异常。

io.selendroid.exceptions.SelendroidException: No android virtu
al devices were found. Please start the android tool and create emulators and re
start the selendroid-standalone or plugin an Android hardware device via USB.
selendroid-standalone server has been started on port: 4444

完整的日志:

F:\>java -jar selendroid-standalone-0.12.0-with-dependencies.jar -aut selendroid
-test-app-0.12.0.apk
################# Selendroid #################
################# Configuration in use #################
io.selendroid.SelendroidConfiguration@12c9b19[
  port=4444
  timeoutEmulatorStart=300000
  supportedApps=[selendroid-test-app-0.12.0.apk]
  verbose=false
  emulatorPort=5560
  deviceScreenshot=false
  selendroidServerPort=8080
  keystore=<null>
  keystorePassword=<null>
  keystoreAlias=<null>
  emulatorOptions=<null>
  registrationUrl=<null>
  proxy=<null>
  serverHost=<null>
  keepAdbAlive=false
  noWebViewApp=false
  noClearData=false
  sessionTimeoutSeconds=1800
  forceReinstall=false
  logLevel=ERROR
  deviceLog=true
  serverStartTimeout=20000
  printHelp=false
]
Jan 14, 2015 11:54:11 PM io.selendroid.SelendroidLauncher launchServer
INFO: Starting selendroid-server port 4444
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/MANIFEST.MF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/CERT.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/CERT.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/ANDROIDD.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/ANDROIDD.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/NDKEYSTO.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/NDKEYSTO.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Java\jdk1.6.0_26\bin\jarsigner.exe -sigalg MD5withRS
A -digestalg SHA1 -signedjar F:\\resigned-selendroid-test-app-0.12.0.apk -storep
ass android -keystore C:\Users\sai\.android\debug.keystore F:\\selendroid-test-a
pp-0.12.0.apk androiddebugkey
Jan 14, 2015 11:54:14 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: App signing output:
Jan 14, 2015 11:54:14 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: The app has been signed: F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe dump
 badging F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe dump
 badging F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.server.model.SelendroidStandaloneDriver i
nitApplicationsUnderTest
INFO: App io.selendroid.testapp:0.12.0 has been added to selendroid standalone s
erver.
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/MANIFEST.MF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/CERT.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/CERT.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/ANDROIDD.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/ANDROIDD.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/NDKEYSTO.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/NDKEYSTO.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Java\jdk1.6.0_26\bin\jarsigner.exe -sigalg MD5withRS
A -digestalg SHA1 -signedjar C:\Users\sai\AppData\Local\Temp\resigned-android-dr
iver8494728849163801343.apk -storepass android -keystore C:\Users\sai\.android\d
ebug.keystore C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.
apk androiddebugkey
Jan 14, 2015 11:54:15 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: App signing output:
Jan 14, 2015 11:54:15 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: The app has been signed: C:\Users\sai\AppData\Local\Temp\resigned-android-
driver8494728849163801343.apk
Jan 14, 2015 11:54:17 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\tools\android.bat list avds
Jan 14, 2015 11:54:21 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\platform-tools\adb.exe devices
Jan 14, 2015 11:54:21 PM io.selendroid.server.model.DeviceStore addEmulators
INFO: No emulators has been found.
Jan 14, 2015 11:54:21 PM io.selendroid.server.model.DeviceStore initAndroidDevic
es
WARNING: Warning: io.selendroid.exceptions.SelendroidException: No android virtu
al devices were found. Please start the android tool and create emulators and re
start the selendroid-standalone or plugin an Android hardware device via USB.
selendroid-standalone server has been started on port: 4444












F:\>java -jar selendroid-standalone-0.12.0-with-dependencies.jar -aut selendroid
-test-app-0.12.0.apk
################# Selendroid #################
################# Configuration in use #################
io.selendroid.SelendroidConfiguration@12c9b19[
  port=4444
  timeoutEmulatorStart=300000
  supportedApps=[selendroid-test-app-0.12.0.apk]
  verbose=false
  emulatorPort=5560
  deviceScreenshot=false
  selendroidServerPort=8080
  keystore=<null>
  keystorePassword=<null>
  keystoreAlias=<null>
  emulatorOptions=<null>
  registrationUrl=<null>
  proxy=<null>
  serverHost=<null>
  keepAdbAlive=false
  noWebViewApp=false
  noClearData=false
  sessionTimeoutSeconds=1800
  forceReinstall=false
  logLevel=ERROR
  deviceLog=true
  serverStartTimeout=20000
  printHelp=false
]
Jan 14, 2015 11:54:11 PM io.selendroid.SelendroidLauncher launchServer
INFO: Starting selendroid-server port 4444
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/MANIFEST.MF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/CERT.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/CERT.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/ANDROIDD.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/ANDROIDD.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/NDKEYSTO.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/NDKEYSTO.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Java\jdk1.6.0_26\bin\jarsigner.exe -sigalg MD5withRS
A -digestalg SHA1 -signedjar F:\\resigned-selendroid-test-app-0.12.0.apk -storep
ass android -keystore C:\Users\sai\.android\debug.keystore F:\\selendroid-test-a
pp-0.12.0.apk androiddebugkey
Jan 14, 2015 11:54:14 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: App signing output:
Jan 14, 2015 11:54:14 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: The app has been signed: F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe dump
 badging F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe dump
 badging F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.server.model.SelendroidStandaloneDriver i
nitApplicationsUnderTest
INFO: App io.selendroid.testapp:0.12.0 has been added to selendroid standalone s
erver.
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/MANIFEST.MF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/CERT.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/CERT.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/ANDROIDD.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/ANDROIDD.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/NDKEYSTO.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/NDKEYSTO.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Java\jdk1.6.0_26\bin\jarsigner.exe -sigalg MD5withRS
A -digestalg SHA1 -signedjar C:\Users\sai\AppData\Local\Temp\resigned-android-dr
iver8494728849163801343.apk -storepass android -keystore C:\Users\sai\.android\d
ebug.keystore C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.
apk androiddebugkey
Jan 14, 2015 11:54:15 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: App signing output:
Jan 14, 2015 11:54:15 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: The app has been signed: C:\Users\sai\AppData\Local\Temp\resigned-android-
driver8494728849163801343.apk
Jan 14, 2015 11:54:17 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\tools\android.bat list avds
Jan 14, 2015 11:54:21 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\platform-tools\adb.exe devices
Jan 14, 2015 11:54:21 PM io.selendroid.server.model.DeviceStore addEmulators
INFO: No emulators has been found.
Jan 14, 2015 11:54:21 PM io.selendroid.server.model.DeviceStore initAndroidDevic
es
WARNING: Warning: io.selendroid.exceptions.SelendroidException: No android virtu
al devices were found. Please start the android tool and create emulators and re
start the selendroid-standalone or plugin an Android hardware device via USB.
selendroid-standalone server has been started on port: 4444

请帮助解决问题! 谢谢

#1楼 票数:0

http://selendroid.io/setup.html部分“使用仿真器”中查看。

  ask by Sai Upadhyayula translate from so

未解决问题?本站智能推荐:

1回复

找不到Android虚拟设备

我安装了Android SDK和Eclipse以及所有内容。 当我运行我的第一个Android应用程序时,出现以下错误: [SDK管理器]无法找到供ABI armeabi复制到AVD文件夹的'userdata.img'文件。 我该如何解决?
3回复

在Windows上找不到Android虚拟设备“ / dev / kvm”

我已经在计算机上使用Android Studio大约两年了。 我最近更新到Windows 10,并开始遇到一些问题,其中大多数问题已得到解决。 但是,现在我无法创建任何手机的仿真器,并且Android Studio说“需要Intel HAXM来运行此AVD。找不到/ dev / kvm。
1回复

在android studio 3 Windows 10上找不到虚拟设备

我对Android开发比较陌生,最近我在Windows 10计算机上下载了Android Studio。 但是我面临一些问题。 创建新项目时,在activity_main.xml设计选项卡中看不到任何虚拟设备。 我所看到的只是一条消息,指出“ 设计编辑器”在成功构建之前不可用 。 当我单
1回复

Selendroid无法启动虚拟设备

我正在尝试针对Android虚拟设备使用selendroid和selenium,但即时通讯存在一些问题。 我已经安装了所有java / android sdk / eclipse软件,并且可以正常运行selenium chromedriver测试。 但是,当我尝试运行启动android虚拟设
4回复

Android虚拟设备未运行

我开始学习Android开发,安装了Android Studio。 尝试启动应用程序时,虚拟设备窗口打开,但出现以下错误: 无法创建上下文0x3005,无法获取wglGetExtensionsStringARB仿真器:警告:无法使用软件渲染器初始化OpenglES仿真。 无法获取w
2回复

无法加载的android虚拟设备

当我在窗口 7 中启动 eclipse 时,我收到一条错误消息: 在做了一些研究之后,我找到了一个解决方案并删除了~/.android并重新启动了 Eclipse,但现在我收到另一条消息: 我尝试再次重新安装整个设置,但仍然遇到此问题。
2回复

Android虚拟设备离线

我安装了Android SDK并编写了一个应用程序,并构建了AVD Manager以在设备上查看我的应用程序,但是当我尝试将项目作为Android应用程序运行时,找不到我的设备(目标已脱机)。
2回复

为什么我不能创建android虚拟设备?

这个问题有点类似于无法创建Android虚拟设备 , 不同之处在于我试图在Windows而非ubuntu 上创建AVD , 另一个区别是我可以无错误地创建android 2.2和2.3 AVD , 但是创建ADV失败4.x ,为什么? 无论如何,我已经为4.x安装了sdk和api 。