Appium on window, start session on Android Studio Emulator, error message Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported

Hi,

I am using Appium version 1.21.0 on my window 11 laptop, and when I try to use Appium Inspector to start a session on Android Studio emulator with the configuration below, then it gave me Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. But since my “device” is already running on the Android Studio, do I still need to set the environment parameter?

{
“deviceName”: “emulator-5554”,
“platformName”: “android”,
“appium:noReset”: true
}

An unknown server-side error occurred while processing the command. Original error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. Read https://developer.android.com/studio/command-line/variables for more details

Probably a better question for the Appium Studio forum: