我正在尝试安装AndroidViewClient,但是有很多问题。我在dtmilano的github上下载。我在小牛队,我对python很陌生..我知道如何使用Monkeyrunner,但是自从我下载了AndroidViewClient,我就完全迷路了!
Si在github上一步一步地按照说明操作!当我尝试启动./dump时,我收到了这样的消息:
Traceback (most recent call last):
File "./tools/dump", line 126, in <module>
vc = ViewClient(*ViewClient.connectToDeviceOrExit(**kwargs1), **kwargs2)
File "/Library/Python/2.7/site-packages/androidviewclient-5.6.0- py2.7.egg/com/dtmilano/android/viewclient.py", line 1188, in __init__
adb = ViewClient.__obtainAdbPath()
File "/Library/Python/2.7/site-packages/androidviewclient-5.6.0-py2.7.egg/com/dtmilano/android/viewclient.py", line 1341, in __obtainAdbPath
raise Exception('adb="%s" is not executable. Did you forget to set ANDROID_HOME in the environment?' % adb)
Exception: adb="adb" is not executable. Did you forget to set ANDROID_HOME in the environment?以下是我的环境变量:
ANDROID_HOME=/Users/Flo/Documents/adt-bundle-mac-x86_64-20130729/sdk/
ANDROID_VIEW_CLIENT_HOME=/Users/Flo/Documents/Android/AndroidViewClient-5.1.1/AndroidViewClient/如果我执行cd $ANDROID_VIEW_CLIENT_HOME,我会得到我的AndroidViewClient文件夹,我不能执行脚本。
当我这样做的时候:python check-import.py --debug,我得到了这样的结果:
sys.path= ['/Users/Flo/Documents/Android/AndroidViewClient-5.1.1/AndroidViewClient/examples', '/Library/Python/2.7/site-packages/androidviewclient-5.6.0-py2.7.egg', '/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Users/Flo/Documents/Android/AndroidViewClient-5.1.1/AndroidViewClient/src']
OK有谁能帮帮我吗?我已经吃了两天了,我不知道我能做些什么。我试过很多方法。删除/重新安装AndroidViewClient,但结果总是一样的
发布于 2014-05-22 04:53:23
我知道你是用来安装的
$ sudo easy_install --upgrade androidviewclient那么,你应该这样做
$ export ANDROID_HOME=/Users/Flo/Documents/adt-bundle-mac-x86_64-20130729/sdk/如果你想让它持久化,就把它添加到~/.bash_profile。
然后您应该能够执行dump而不会出现问题。这些工具正试图在一些已知的位置或在$ANDROID_HOME/platform-tools/adb上查找adb。检查以确保adb在那里并且是可执行的。
https://stackoverflow.com/questions/23778474
复制相似问题