Ionic can't build

I want to use android 5.0.0 when I build it error

node:20943) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.

but I can build android 6.0 and 7.0


I assume it has something todo with api level. Android 5.0 is api level 21, 5.1 is api level 22.

Take a look to config.xml with android min-sdk is like
<preference name="android-minSdkVersion" value="19" />

If it isn’t this, then take a look to sdk manager what for sdk is installed and make a search, if this sdk supports api-level 21.

Best regards, anna-liebt