Compatible java version with appium

Hi,

I am about to set up appium so which Java version to use.

What is the officially supported and recommenced version of JAVA that can be used with APPIUM?

Are there any known compatibility issues with JAVA 18 and APPIUM ?

Thanks!

There were some issues with 18 version. As I remember with Selenium, which is actually used with test also. Better prefer 11

Thanks Sir, I have done all the installation but i am getting the below error while running the code. Plz help

OS: Window 10
Java version: Java 11
Java client version is 7.0.0

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: Error executing adbExec. Original error: ‘Command ‘F:\android-sdk\platform-tools\adb.exe -P 5037 -s 69CEKBJBW88TYT8L shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy’’ exited with code 255’; Command output:
Exception occurred while executing ‘delete’:
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2374)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1413)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1405)
at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1376)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:561)
at android.content.ContentProvider.call(ContentProvider.java:2448)
at android.content.ContentProvider$Transport.call(ContentProvider.java:517)
at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:936)
at android.os.Binder.onTransact(Binder.java:820)
at android.os.Binder.execTransactInternal(Binder.java:1166)
at android.os.Binder.execTransact(Binder.java:1130)

Exception occurred while executing ‘delete’:
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2374)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1413)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1405)
at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1376)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:561)
at android.content.ContentProvider.call(ContentProvider.java:2448)
at android.content.ContentProvider$Transport.call(ContentProvider.java:517)
at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:936)
at android.os.Binder.onTransact(Binder.java:820)
at android.os.Binder.execTransactInternal(Binder.java:1166)
at android.os.Binder.execTransact(Binder.java:1130)

Exception occurred while executing ‘delete’:
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2374)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1413)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1405)
at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1376)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:561)
at android.content.ContentProvider.call(ContentProvider.java:2448)
at android.content.ContentProvider$Transport.call(ContentProvider.java:517)
at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:936)
at android.os.Binder.onTransact(Binder.java:820)
at android.os.Binder.execTransactInternal(Binder.java:1166)
at android.os.Binder.execTransact(Binder.java:1130)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘DESKTOP-3C9H5JM’, ip: ‘192.168.1.104’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.4.1’
Driver info: driver.version: AppiumDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘F:\android-sdk\platform-tools\adb.exe -P 5037 -s 69CEKBJBW88TYT8L shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy’’ exited with code 255’; Command output:
Exception occurred while executing ‘delete’:

Probably this:

Thanks, After following these steps previous error got resolved but now getting different error.

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: Cannot verify the signature of ‘C:\Users\ksali\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.27.0.apk’. Original error: Could not find ‘apksigner.jar’ in [“F:\android-sdk\platform-tools\apksigner.jar”,“F:\android-sdk\emulator\apksigner.jar”,“F:\android-sdk\cmdline-tools\latest\bin\apksigner.jar”,“F:\android-sdk\tools\apksigner.jar”,“F:\android-sdk\tools\bin\apksigner.jar”,“F:\android-sdk\apksigner.jar”]. Do you have Android Build Tools installed at ‘F:\android-sdk’?
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘DESKTOP-3C9H5JM’, ip: ‘192.168.1.104’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.4.1’
Driver info: driver.version: AppiumDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:\Users\ksali\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.27.0.apk’. Original error: Could not find ‘apksigner.jar’ in [“F:\android-sdk\platform-tools\apksigner.jar”,“F:\android-sdk\emulator\apksigner.jar”,“F:\android-sdk\cmdline-tools\latest\bin\apksigner.jar”,“F:\android-sdk\tools\apksigner.jar”,“F:\android-sdk\tools\bin\apksigner.jar”,“F:\android-sdk\apksigner.jar”]. Do you have Android Build Tools installed at ‘F:\android-sdk’?
at getResponseForW3CError (C:\Users\ksali\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (C:\Users\ksali\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:380:37)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘DESKTOP-3C9H5JM’, ip: ‘192.168.1.104’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.4.1’
Driver info: driver.version: AppiumDriver

Did you check this? You may want to follow a tutorial or something.

Yes, it is installed in the mentioned path

Then why can’t it find apksigner.jar in any of those paths?