Sorry, this is caused by my mistake, there is a typo in the script file.

在 2012年6月2日星期六UTC+8上午12时28分01秒,Roger Li写道:
>
> Hi guys,
>
> I followed the instructions in 
> http://dtmilano.blogspot.com/2011/03/using-android-monkeyrunner-from-eclipse.html
>  to 
> config monkeyrunner in my ubuntu env.
> But there is an error when executing the script:
>
> from com.android.monkeyrunner import MonekyRunner
> from com.android.monkeyrunner.recorder import MonkeyRecorder
> device = MonkeyRunner.waitForConnection()
> recorder.start(device)
>
> The error:
> 120602 00:13:44.884:S [main] 
> [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an 
> exception
> 120602 00:13:44.884:S [main] 
> [com.android.monkeyrunner.MonkeyRunnerOptions]Traceback (most recent call 
> last):
>   File 
> "/home/rogerli/work/android/workspace/AutoTest/selfsystem/testrecord.py", 
> line 2, in <module>
>     from com.android.monkeyrunner import MonekyRunner
> ImportError: cannot import name MonekyRunner
>
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.PyException.fillInStackTrace(PyException.java:70)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> java.lang.Throwable.<init>(Throwable.java:198)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> java.lang.Exception.<init>(Exception.java:46)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> java.lang.RuntimeException.<init>(RuntimeException.java:49)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.PyException.<init>(PyException.java:46)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.PyException.<init>(PyException.java:43)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.PyException.<init>(PyException.java:61)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.Py.ImportError(Py.java:264)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.imp.importFromAs(imp.java:875)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.imp.importFrom(imp.java:845)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.pycode._pyx0.f$0(/home/rogerli/work/android/workspace/AutoTest/selfsystem/testrecord.py:7)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.pycode._pyx0.call_function(/home/rogerli/work/android/workspace/AutoTest/selfsystem/testrecord.py)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.PyTableCode.call(PyTableCode.java:165)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.PyCode.call(PyCode.java:18)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.Py.runCode(Py.java:1197)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.core.__builtin__.execfile_flags(__builtin__.java:538)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:156)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> com.android.monkeyrunner.ScriptRunner.run(ScriptRunner.java:116)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:77)
> 120602 00:13:44.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] 
> at 
> com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:189)
>
> Can anyone help me a hand?
>
>
> Thanks,
> Roger
>
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to