Eclipse (4.2) から MonkeyRunner Android テスト ツールを実行しようとしています。Eclipse PyDev プラグインと Jython 2.5.1 をインストールしました。私の PyDev インタープリターは Jython / 2.5 に設定されています。
単純な jython ファイルを使用して、Eclipse で 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 として実行)、次の例外が発生します。
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
何が間違っている可能性がありますか?