Because you must run the appropriate emulator or connect to the real machine before running Monkeyrunner, Monkeyrunner cannot connect to the device, there are two ways to run the emulator: 1, execute simulator 2 through Eclipse, invoke simulator in CMD, This document addresses the problems and workarounds that occur when you open the emulator in CMD.
1. Create simulator
After installing the Android SDK, you can create an emulator, about the creation of the simulator, a bunch of materials on the web, such as http://jingyan.baidu.com/article/ C74d600068ad420f6a595dd2.html, here we create a simulator named Test
2. Open Simulator
Command: EMULATOR-AVD test
Open cmd, if you have added environment variables, you can execute this command in any directory, otherwise you need to go to the tools directory
Error 1: executing EMULATOR-AVD test, prompting
Emulator:ERROR:Unable to load VMs from snapshot. The snapshot have been saved for a different hardware configuration.
Workaround: reopen the AVD and edit the details: Emulation option, remove the snapshot check box and close after saving
error 2: re-entry into CMD EMULATOR-AVD test, hint
Could not get Wglgetextensionsstringarb
Emulator:WARNING:Could not initialize opengles emulation, using software renderer.
Wglgetextensionsstringarb belongs to OpenGL ES, this error is caused by support for OpenGL ES, OpenGL es is used for display and GPU acceleration, and it is also used in Android emulator as part of hardware acceleration.
Workaround: Open the Control Panel-windows updata, update the system software, OK
EMULATOR-AVD test again, successfully opened the simulator
Create an Android emulator and open it in cmd