I'm trying to run MonkeyRunner Android test tool from Eclipse (4.2). I installed Eclipse PyDev plugin, as well as Jython 2.5.1. My PyDev interpreter is set to Jython / 2.5.
I created a Jython project in Eclipse with a simple jython file:
# 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()
Now when I launch it from Eclipse (project > run as JythonProject), I'me getting the following exception:
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
Any idea what can be wrong?