Team City can't build to Android

Hi! I am trying to build the game with TeamCity to Android Device and has this error.
ERROR: Platform Android is not a valid platform to build. Check that the SDK is installed properly.
but when I build from CMD (exactly the same command as Team City did) - its OK!

X:\GIT[UE4]\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=D:/[UE4]/MyGame/MyGame.uproject -noP4 -clientconfig=Development -serverconfig=Development -nocompile -utf8output -platform=Android -targetplatform=Android -cookflavor=ETC2 -build -cook -map=TestMap

The Team City log before fail is:

X:\GIT[UE4]\UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool.exe MyGame Android Development -Project=D:[UE4]\MyGame\MyGame.uproject D:[UE4]\MyGame\MyGame.uproject -NoUBTMakefiles -remoteini=“D:[UE4]\MyGame” -Manifest=X:\GIT[UE4]\UnrealEngine\Engine\Intermediate\Build\Manifest.xml -NoHotReload -log=“X:\GIT[UE4]\UnrealEngine\Engine\Programs\AutomationTool\Saved\Logs\UBT-MyGame-Android-Development.txt”

ERROR: Platform Android is not a valid platform to build. Check that the SDK is installed properly.

why doesn’t it see the SDK path? all Environment Variables are set up properly.
I can build , package and deploy the game via CMD, Project Launcher and Editor, but Team City failed to build it.

whats am I doing wrong? Thank you very much )

resolved by manual environment variables setup.

Hi @NoCodeBugsFree , sorry to bother

Im in the very exact situation,was able to make builds from editor or with the same commands in .bat script just fine, but im facing the same error as you di in teamcity

what do you mean by manual enviroment variables setup ?, did you have to set new enviroment variables so those could be seen from teamcity ?

do you happen to remember any details ?

Thanks !