Reputation: 709
I am successful in taking snapshot and open a activity using monkeyrunner. But what I want is to press a Button. So I am using ViewClient, but whenever I run my jython script the error comes:
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
raises 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?
Thanks in Advance
Upvotes: 2
Views: 2540
Reputation: 35
set ANDROID_HOME=c:\Users\Administrator\AppData\Local\Android\android-sdk
Or any other place where you put Android SDK in your installation.
Replace 'Administrator' with your local Windows username (based on locale).
Tested on MS Windows 7 x64 Ultimate with Russian locale and JAVA/JRuby versions:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
and
jruby 9.0.0.0 (2.2.2) 2015-07-21 e10ec96 Java HotSpot(TM) 64-Bit Server VM 25.51
-b03 on 1.8.0_51-b16 +jit [Windows 7-amd64]
io/console not supported; tty will not be manipulated
NameError: undefined local variable or method `rsion' for main:Object
<top> at -e:1
Upvotes: 0
Reputation: 997
What OS are you using? Well, depending on your OS, you need to tell it where your Android SDK is located. For example, in Ubuntu machine, I have the following line in my .bashrc:
ANDROID_HOME=/home/roberto/android-sdk-linux/tools:/home/roberto/android-sdk-linux/platform-tools
export ANDROID_HOME
PATH=$PATH:$ANDROID_HOME
export PATH
If you are on a Windows machine, then you need to add this path to your Windows Environment's PATH.
Upvotes: 5