I have just started dabbling in Cordova / Ionic to make Android / iOS apps with HTML5 / js, and so far I have gotten sample / tutorial apps to work sometimes, but not every
I have solved this problem by having the correct version of the build tools too (not only the SDK platform).
If ionic sets the platform target to android-21 (see console log when adding the platform), install the build tools 21.x.x also.