Hello, I’m trying to run some tests on my android device and keep getting the following error:
I’ve looked into several solutions offered on various forums. At first I set my variables under ~/.bash_profile but later discovered that being on MacOS Monterey, I should instead use ~/.zprofile. So I set my variables there, and even set them on ~/.zshenv out of frustration but it’s still not working.
This is what I have set:
export JAVA_HOME=$(/usr/libexec/java_home)
export ANDROID_HOME=/Users/clement/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$PATH
export PATH=$ANDROID_HOME/build-tools/:$PATH
export PATH=$ANDROID_HOME/emulator:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH
With echo $ANDROID_HOME, I can see the path being returned properly, and when I use appium-doctor it’s all good too:
But if I then try to run my test, or even just use the Appium Inspector to connect to my device, it’s throwing the error again.
I’m really not sure what else to do, I’ve looked in so many forums and tried so many different solutions but nothing worked

Has anyone ever encountered this or has a potential solution?
Thank you very much