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!"
please help.
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