在环境中设置ANDROID_HOME,ViewClient

时间:2013-01-29 02:23:59

标签: android monkeyrunner androidviewclient

我在测试中使用viewclient按下按钮。但我得到ANDROID_HOME路径没有设置,虽然我在环境变量中设置它。我使用的是Windows7操作系统。

File "F:\Example\AndroidViewClient\src\com\dtmilano\android\viewclient.py", line 870, in _init_()
File "F:\Example\AndroidViewClient\src\com\dtmilano\android\viewclient.py", line 986 in _ViewClient_obtainAdbPath

引发了异常

('adb="%s" is not executable. Did you forget to set ANDROID_HOME in the environment?' %adb)
Exception: adb="%s" is not executable. Did you forget to set ANDROID_HOME in the environment?

我的env变量

ANDROID_HOME=C:\adt-bundle-windows-x86_64\adt-bundle-windows\sdk\platform-tools
ANDROID_VIEW_CLIENT_HOME=C:\Users\testing\Downloads\AndroidViewClient-version_2_3_1\AndroidViewClient-version_2_3_1\AndroidViewClient

它看起来全身而且搞砸了。所以想到找专家并在这里发帖。提前致谢

2 个答案:

答案 0 :(得分:0)

升级到最新的AndroidViewClient版本(2.3.4)可以解决其中一些 Windows 问题。

答案 1 :(得分:0)

set ANDROID_HOME=c:\Users\Administrator\AppData\Local\Android\android-sdk

帮我解决了

RuntimeError: The '<ANDROID_HOME>/tools' directory is missing.
Please set the ANDROID_HOME environment variable to a proper Android SDK installation.

RuntimeError: Unable to locate the "adb" command.  
Either set the ANDROID_HOME environment variable or add the location of the "adb" command to your path.