I am new to cordova developments. Before I getting started with cordova i installed Android SDK from the command line. And JDK and Apache ant also already installed. According t
I suggest to you to use a gradle updated. I'm using at january 2018 gradle 4.1
To set the target of your android project you can run:
$ export ORG_GRADLE_PROJECT_cdvMinSdkVersion=21
$ cordova build android
As is written in doc: https://cordova.apache.org/docs/en/dev/guide/platforms/android/index.html#setting-gradle-properties
And if at least yet doesn't working... download the appropriated build tool. With command line is:
$ android/tools/bin/sdkmanager "build-tools;21.0.0"
And try again the requirement or build.
Try installing a target with sdkmanager on the command line.
e.g.
sdkmanager "platforms;android-26"
and then trying cordova requirements
again.
Hopefully you should then get the message:
Android target: installed android-26