unresolved import:monkeyrunner using monkeyrunner interpreter

494 views Asked by At

I am getting the error message using monkeyrunner interpreter, but the code runs absolutely fine. I have imported all correct PYTHONPATH and I am on mac machine and using eclipse Luna.

unresolved import:monkeyrunner

this is a very simple code, it shows RED for "waitForConnection"

from com.android.monkeyrunner import MonkeyRunner
device = MonkeyRunner.waitForConnection(30, "4df112090e855fdb")
print "connected!"

enter image description here

please help.

1

There are 1 answers

2
Diego Torres Milano On

You should use monkeyrunner as the interpreter for that project in Eclipse. Take a look at http://dtmilano.blogspot.com/2012/03/eclipse-working-monkeyrunner.html for guidelines.

However, you should also check other entries in that blog showing alternative approaches using 100% python solutions.

EDIT

Try adding monkeyrunner.jar to the Libraries tab in Windows->Preferences->PyDev->Intenrpreter