在环境中设置ANDROID_HOME,ViewClient

问题描述 投票:1回答:2

我在测试中使用视图客户端按下按钮。但我得到ANDROID_HOME路径没有设置,虽然我在环境变量中设置它。我正在使用Windows 7操作系统。

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

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

android monkeyrunner androidviewclient
2个回答
1
投票

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


1
投票
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.
© www.soinside.com 2019 - 2024. All rights reserved.