It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible

I am using Appium v1.21.0
Tried: io.appium:java-client:6.1.0’ & 7.5.3 appium java client as gradle

Executed as gradle build below error I am getting
Android environment variables set on Bash profile. able to execute in maven project but it is failing on Gradle build please help me on this ASAP

#Appium #issues-bugs #tutorials-documentation #news

[debug] e[35m[W3C]e[39m Encountered internal error running command: Error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. Read for more details
[debug] e[35m[W3C]e[39m at requireSdkRoot (/Applications/
[debug] e[35m[W3C]e[39m at Function.createADB (/Applications/
[debug] e[35m[W3C]e[39m at Object.createBaseADB (/Applications/
[debug] e[35m[W3C]e[39m at Object.getDeviceInfoFromCaps (/Applications/
[debug] e[35m[W3C]e[39m at AndroidUiautomator2Driver.startUiAutomator2Session (/Applications/
[debug] e[35m[W3C]e[39m at AndroidUiautomator2Driver.createSession (/Applications/
[debug] e[35m[W3C]e[39m at AppiumDriver.createSession (/Applications/