2

I am using viewclient for button pressing in my tests. But i am getting ANDROID_HOME path was not set, though i set it in the environment variables. I am using windows7 OS.

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

It raised following exception

('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?

My env variable

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

It looked all over and messed up with it. So thought of asking for experts and posting this here. Thanks in advance

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
msk
  • 135
  • 2
  • 13
  • Try adding what you have set to ANDROID_HOME to your PATH variable. I have had similar problems in the past and I believe that was the fix. – Matt Clark Jan 29 '13 at 02:51
  • I've done the same.. But still it is showing the same error. It's really annoying :( – msk Jan 29 '13 at 04:45

2 Answers2

1

Upgrading to the latest AndroidViewClient version (2.3.4) should solve some of these Windows problems.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
1
set ANDROID_HOME=c:\Users\Administrator\AppData\Local\Android\android-sdk

helped me to resolve

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

and

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.