this issue comes up with 2 reasons
1) the android SDK has not been install 2) the build toold version corresponsind to the android SDK is not installed
to start
open terminal and type android
and install API 26(updated one) and build tools version 26.0.1 or 26.0.2
then try to run using command ionic cordova build android