Original error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. on Mac for Appium

This is the issue in latest Mac 11.6
Even added path in zshenv profile

Error in Mac with cucumber+Gradle project
In maven this error not appeared

I think you should put those in the .zshrc file:

Don’t forget to source the file once you create/edit it.

Now type command source ~/.zshrc to apply changes.