I am unable to setup android emulator

Compatability:

{
“platformName”: “Android”,
“deviceName”: “emulator-5554”,
“automationName”: “UIAutomator2”,
“appPackage”: “com.google.android.dialer”,
“appActivity”: “DialtactsActivity”
}

Error

Failed to create session. An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:\Users\ASUS\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.27.0.apk’. Original error: The ‘java.exe’ binary could not be found neither in PATH nor under JAVA_HOME (C:\Java\jdk1.8.0_291\bin\bin)

When i change compatability:

{
“appium:deviceName”: “R9ZN603823P”,
“platformName”: “Android”,
“appium:platformVersion”: “12”,
“appium:uiautomator2ServerLauchTimeout”: “90000”,
“appium:waitForQuiescence”: “false”
}

Error

Failed to create session. An unknown server-side error occurred while processing the command. Original error: Unable to find an active device or emulator with OS 12. The following are available: emulator-5554 (11)

You have to make sure the appium is running and the emulator is opened.
Please try this compatibility
{
“platformName”: “Android”,
“automationName”: “UIAutomator2”,
“appPackage”: “com.google.android.xxx”,
“appActivity”: “com.google.android.MainActivity”,
“platformVersion”: “11”,
“deviceName”: “Android emulator”
}