android - Selendroid - ANDROID_HOME not found even after setting it -
i trying run selendroid test mobile website run test exception saying:
may 19, 2014 11:48:59 io.selendroid.selendroidlauncher launchserver info: starting selendroid-server port 4444 may 19, 2014 11:48:59 io.selendroid.selendroidlauncher launchserver severe: error occurred while building server: io.selendroid.exceptions.selendroidexception: environment variable 'android_home' not found! java.lang.runtimeexception: io.selendroid.exceptions.selendroidexception: environment variable 'android_home' not found! @ io.selendroid.server.model.selendroidstandalonedriver.initapplicationsundertest(selendroidstandalonedriver.java:142) @ io.selendroid.server.model.selendroidstandalonedriver.<init>(selendroidstandalonedriver.java:80) @ io.selendroid.server.selendroidstandaloneserver.initializeselendroidserver(selendroidstandaloneserver.java:91) @ io.selendroid.server.selendroidstandaloneserver.<init>(selendroidstandaloneserver.java:65) @ io.selendroid.selendroidlauncher.launchserver(selendroidlauncher.java:49) @ io.selendroid.selendroidlauncher.launchselendroid(selendroidlauncher.java:73) @ com.pb.crawler.mobilewebtest.startselendroidserver(mobilewebtest.java:86) @ com.pb.crawler.mobilewebtest.main(mobilewebtest.java:27) caused by: io.selendroid.exceptions.selendroidexception: environment variable 'android_home' not found! @ io.selendroid.android.androidsdk.androidhome(androidsdk.java:97) @ io.selendroid.android.androidsdk.platformtoolshome(androidsdk.java:86) @ io.selendroid.android.androidsdk.aapt(androidsdk.java:39) @ io.selendroid.android.impl.defaultandroidapp.deletefilefromwithinapk(defaultandroidapp.java:102) @ io.selendroid.builder.selendroidserverbuilder.deletefilefromappsilently(selendroidserverbuilder.java:116) @ io.selendroid.builder.selendroidserverbuilder.resignapp(selendroidserverbuilder.java:125) @ io.selendroid.server.model.selendroidstandalonedriver.initapplicationsundertest(selendroidstandalonedriver.java:138) ... 7 more exception in thread "main" java.lang.runtimeexception: io.selendroid.exceptions.selendroidexception: environment variable 'android_home' not found! @ io.selendroid.server.model.selendroidstandalonedriver.initapplicationsundertest(selendroidstandalonedriver.java:142) @ io.selendroid.server.model.selendroidstandalonedriver.<init>(selendroidstandalonedriver.java:80) @ io.selendroid.server.selendroidstandaloneserver.initializeselendroidserver(selendroidstandaloneserver.java:91) @ io.selendroid.server.selendroidstandaloneserver.<init>(selendroidstandaloneserver.java:65) @ io.selendroid.selendroidlauncher.launchserver(selendroidlauncher.java:49) @ io.selendroid.selendroidlauncher.launchselendroid(selendroidlauncher.java:73) @ com.pb.crawler.mobilewebtest.startselendroidserver(mobilewebtest.java:86) @ com.pb.crawler.mobilewebtest.main(mobilewebtest.java:27) caused by: io.selendroid.exceptions.selendroidexception: environment variable 'android_home' not found! @ io.selendroid.android.androidsdk.androidhome(androidsdk.java:97) @ io.selendroid.android.androidsdk.platformtoolshome(androidsdk.java:86) @ io.selendroid.android.androidsdk.aapt(androidsdk.java:39) @ io.selendroid.android.impl.defaultandroidapp.deletefilefromwithinapk(defaultandroidapp.java:102) @ io.selendroid.builder.selendroidserverbuilder.deletefilefromappsilently(selendroidserverbuilder.java:116) @ io.selendroid.builder.selendroidserverbuilder.resignapp(selendroidserverbuilder.java:125) @ io.selendroid.server.model.selendroidstandalonedriver.initapplicationsundertest(selendroidstandalonedriver.java:138) ... 7 more
although android_home
set echoing commands gives me right path.
~ vshukla$ echo $java_home /library/java/home ~ vshukla$ echo $android_home /users/vshukla/androidsdk/sdk
i unable understand why happening. please help.
it worked me
- open edit /etc/launchd.conf file
- add following: setenv android_home /location android_home
- reboot , should work.
i hope helps!!
Comments
Post a Comment