当从 Windows Android SDK 运行 monkeyrunner.bat 时,它会抛出一个异常来寻找一个带有 IP 地址和端口号的 MonkeyServer,该 IP 地址和端口号应该作为参数输入到 bat 脚本中。我用谷歌搜索搜索了互联网,并查看了 monkeyrunner 上的 Android 开发人员文档,但找不到对这个神秘服务器的任何引用。
这是抛出的异常:
130830 00:24:51.664:I [main] [com.android.chimpchat.ChimpManager] Monkey Command: wake.
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] Error starting command: monkey --port 12345
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice]com.android.ddmlib.ShellCommandUnresponsiveException
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:408)
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.ddmlib.Device.executeShellCommand(Device.java:435)
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.chimpchat.adb.AdbChimpDevice$1.run(AdbChimpDevice.java:104)
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
130830 00:24:54.703:I [pool-1-thread-1] [com.android.chimpchat.adb.AdbChimpDevice] at java.lang.Thread.run(Thread.java:662)
monkeyrunner.bat 的使用说明了这一点:
Usage: monkeyrunner [options] SCRIPT_FILE
-s MonkeyServer IP Address.
-p MonkeyServer TCP Port.
-v MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)
有谁知道神秘服务器和神秘IP地址/TCP端口???特别是,我想知道 MonkeyServer 是什么,它的用途是什么,如果我想运行一个,我会运行什么,我会在哪里运行它以及如何运行它。关于日志记录级别的任何启示也会很有用,但可能的级别参数大多是不言而喻的,尽管我确实发现 FINEST、FINER 和 FINE 令人着迷。