Detected outdated SDK Tools version 0.0

When I try to build for Android I get the following error

“Detected outdated SDK Tools version 0.0 when the min version is 26.1.1”

SDK with version 23 - 30( android studio) is installed
Its path is used in the Unity editor preferences for external tools.

It appears that the build process is some how mistakenly detecting the tools version as 0.0.

This also is happening as part of my CI building.

Any help would be appreciated.

for anyone else with this issue

The issue was the Android SDK tools needed updating.
It appears the android sdk command line tool folder in my CI VM was out of date.

I zipped the one that is installed via Unity Hub and have that downloaded and installed as part of the VM “Setup” and now it works.