Unable to launch a android device using appium due to below error. Java -version returns below results when running on command prompt.
java version “1.8.0_45”
Java™ SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot™ 64-Bit Server VM (build 25.45-b02, mixed mode
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: ‘java -version’ failed. Error: spawn ENOENT) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 512 milliseconds
Please help in this regards, it is a blocker for our testing.
I am hoping you have installed Android SDK properly with required packages.
Did you configured Android environment properly?
If you are not, Add “ANDROID_HOME” system environmental variable pointing to Android SDK path, ANDROID_HOME — D:\UD\sdk (this is where i copied my Android SDK)
Add following to your system “PATH” variable - %ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;
If you have configured above var.s properly,
In command prompt, what “adb devices” command returns.
Thanks UD for reply. I don’t see any devices in command prompt. I have all properties configured as you mentioned.On Running adb devices, I don’t see any devices. Please refer attached screenshot.
I’m getting same issue on mac(Yosemite) but if i try “java -version” on terminal it works fine. I have all the environment variable setup as when i run Appium doctor it show all the checks are passed.
Any solution.