Help: Setting the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the correct Android SDK root directory path

I am on macOS Mojave version 10.14.5
I am trying to run a test on Android Studio as shown in the tutorial here It’s until 19:44, when I tried to start the session, I receive an error message

An unknown server-side error occurred while processing the command. Original error: Could not find ‘aapt’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the corect Android SDK root directory path.

How do I go about solving this? How do I ensure that ANDROID_HOME or ANDROID_SDK_ROOT environment variables are set to the correct Android SDK root directory path.

I would need a step-by-step solution as I’m new to using appium and tech in general. I’ve googled a few solutions on Stack Overflow and Appium forum previously, but none of the method works.