.common.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!

47 views
Skip to first unread message

samuraii

unread,
Jan 29, 2019, 3:15:03 AM1/29/19
to selendroid
Hello, I saw some topics on this issue here, but there was not found any step-to-follow 100% solutions. The reason for such behavior was not explained also, so I have to add this new topic here.

My system Ubuntu 18.04
I have my $ANDROID_PATH, Path to tools and so on as I use emulators to run appium. Here my appium-doctor output:

Appium Doctor v.1.8.0
info AppiumDoctor ### Diagnostic for necessary dependencies starting ###
info AppiumDoctor  ✔ The Node.js binary was found at: /usr/bin/node
info AppiumDoctor  ✔ Node version is 10.15.0
info AppiumDoctor  ✔ ANDROID_HOME is set to: /home/appium/Android/Sdk
info AppiumDoctor  ✔ JAVA_HOME is set to: /usr/bin/java
info AppiumDoctor  ✔ adb exists at: /home/appium/Android/Sdk/platform-tools/adb
info AppiumDoctor  ✔ android exists at: /home/appium/Android/Sdk/tools/android
info AppiumDoctor  ✔ emulator exists at: /home/appium/Android/Sdk/tools/emulator
WARN AppiumDoctor  ✖ Bin directory for $JAVA_HOME is not set

I downloaded and try to run Selendroid with: java -jar Downloads/selendroid-standalone-0.17.0-with-dependencies.jar

And I get this:

Jan 29, 2019 11:14:08 AM io.selendroid.standalone.SelendroidLauncher launchServer
INFO: Starting Selendroid standalone on port 4444
Jan 29, 2019 11:14:08 AM io.selendroid.standalone.SelendroidLauncher launchServer
SEVERE: Error building server: io.selendroid.server.common.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!
Exception in thread "main" java.lang.RuntimeException: io.selendroid.server.common.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.initApplicationsUnderTest(SelendroidStandaloneDriver.java:175)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.<init>(SelendroidStandaloneDriver.java:94)
at io.selendroid.standalone.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:63)
at io.selendroid.standalone.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:52)
at io.selendroid.standalone.SelendroidLauncher.launchServer(SelendroidLauncher.java:65)
at io.selendroid.standalone.SelendroidLauncher.main(SelendroidLauncher.java:117)
Caused by: io.selendroid.server.common.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!
at io.selendroid.standalone.android.AndroidSdk.androidHome(AndroidSdk.java:98)
at io.selendroid.standalone.android.AndroidSdk.platformToolsHome(AndroidSdk.java:87)
at io.selendroid.standalone.android.AndroidSdk.aapt(AndroidSdk.java:39)
at io.selendroid.standalone.android.impl.DefaultAndroidApp.deleteFileFromWithinApk(DefaultAndroidApp.java:107)
at io.selendroid.standalone.builder.SelendroidServerBuilder.deleteFileFromAppSilently(SelendroidServerBuilder.java:133)
at io.selendroid.standalone.builder.SelendroidServerBuilder.resignApp(SelendroidServerBuilder.java:142)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.initApplicationsUnderTest(SelendroidStandaloneDriver.java:172)

I believe that something is really wrong with this jar. Could anyone provede a step to follow solution on this?
Reply all
Reply to author
Forward
0 new messages