我已经从https://github.com/dtmilano/AndroidViewClient下载了5.1.1 版本的 .zip。我添加了 ANDROID_VIEW_CLIENT_HOME=/path/to/AndroidViewClient 和 PYTHONPATH=/path/to/AndroidViewClient/src 。
现在,当我运行 python test-connect-to-device.py 时,我得到了 raise AttributeError
我已经从https://github.com/dtmilano/AndroidViewClient下载了5.1.1 版本的 .zip。我添加了 ANDROID_VIEW_CLIENT_HOME=/path/to/AndroidViewClient 和 PYTHONPATH=/path/to/AndroidViewClient/src 。
现在,当我运行 python test-connect-to-device.py 时,我得到了 raise AttributeError
您似乎使用 Python 3 来运行只能在 Python 2 中运行的代码。您必须安装 Python 2 并使用 Python 2 运行脚本才能解决这个问题。
例如,代码
name = "blah"
raise AttributeError, name
在 Python 2 上运行并引发 AttributeError但引发 SyntaxError 并且无法在 Python 3 上编译。