我想從Eclipse(4.2)運行MonkeyRunner Android測試工具。 我安裝了Eclipse PyDev插件,以及Jython 2.5.1。 我的PyDev解釋器設置爲Jython/2.5。Android MonkeyRunner異常
我在Eclipse中創建一個Jython項目,一個簡單的Jython文件:
# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
# Connects to the current device, returning a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
現在,當我從Eclipse的(項目>運行爲JythonProject),I'me啓動它收到以下異常:
Traceback (most recent call last):
File "C:\svnrepository\trunk\JythonProject\src\main.py", line 10, in <module>
device = MonkeyRunner.waitForConnection()
at com.android.monkeyrunner.MonkeyRunner.waitForConnection(MonkeyRunner.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
java.lang.NullPointerException: java.lang.NullPointerException
任何想法可能是錯誤的?