无法在Windows 7上设置AndroidViewClient

时间:2014-09-10 12:58:07

标签: android androidviewclient

我提到wiki并尝试通过互联网但无法使其正常运行。 我已将ANDROID_VIEW_CLIENT_HOME设置为AndroidViewClient文件夹,将PYTHONPATH设置为AndroidViewClient / src文件夹。

我仍无法导入ViewClient并在运行monkeyrunner脚本时遇到以下异常。

    from com.dtmilano.android.viewclient import ViewClient
ImportError: No module named dtmilano

140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.Py.ImportError(Py.java:304)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.import_logic(imp.java:790)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.import_module_level(imp.java:842)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.importName(imp.java:917)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyObject.__call__(PyObject.java:357)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.__builtin__.__import__(__builtin__.java:1173)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.importFromAs(imp.java:1011)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.imp.importFrom(imp.java:987)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.pycode._pyx0.f$0(c:\testing\demo.py:40)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.pycode._pyx0.call_function(c:\testing\demo.py)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyTableCode.call(PyTableCode.java:165)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyCode.call(PyCode.java:18)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.Py.runCode(Py.java:1275)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.__builtin__.execfile_flags(__builtin__.java:522)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:225)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.ScriptRunner.run(ScriptRunner.java:116)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:77)
140910 18:18:23.594:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:189)

你能告诉我我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

强烈建议您使用easy_install安装 AndroidViewClient 。但是,可能不清楚如何在Windows上执行此操作,在这种情况下,您可能会发现How to use Python's "easy_install" on Windows ... it's not so easy的答案很有用。