Hi, I am learning Appium and this is my first automation script for appium. Getting below error while running simple program to open calculator application in Android device. It says that could not find 'adb.exe' but its there in the SDK tools folder. Also I have set ANDROID_HOME in Environment variables and have PATH variable accordingly.Please help.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb.exe' in ["C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\platform-tools\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\emulator\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\tools\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\tools\bin\adb.exe"]. Do you have Android Build Tools installed at 'C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest'? Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'DESKTOP-TN4V3G6', ip: '192.168.99.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13.0.2' Driver info: driver.version: AppiumDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb.exe' in ["C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\platform-tools\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\emulator\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\tools\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\tools\bin\adb.exe"]. Do you have Android Build Tools installed at 'C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest'? at getResponseForW3CError (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9) at asyncHandler (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:388:37) at process._tickCallback (internal/process/next_tick.js:68:7) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'DESKTOP-TN4V3G6', ip: '192.168.99.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13.0.2' Driver info: driver.version: AppiumDriver at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208) at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:37) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:88) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:98) at AppTest1.openCalculator(AppTest1.java:36) at AppTest1.main(AppTest1.java:16) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186) ... 13 more Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb.exe' in ["C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\platform-tools\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\emulator\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\tools\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\tools\bin\adb.exe"]. Do you have Android Build Tools installed at 'C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest'? Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'DESKTOP-TN4V3G6', ip: '192.168.99.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13.0.2' Driver info: driver.version: AppiumDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb.exe' in ["C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\platform-tools\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\emulator\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\tools\adb.exe","C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest\tools\bin\adb.exe"]. Do you have Android Build Tools installed at 'C:\Users\Bhushan\Documents\Automation Testing 2020\Android SDK Tools\android\cmdline-tools\latest'? at getResponseForW3CError (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9) at asyncHandler (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:388:37) at process._tickCallback (internal/process/next_tick.js:68:7) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62) at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128) ... 18 more