Error while importing ionic/cordova project to Android studio

I just started working on Ionic framework and created a project using CLI. I have added support for android platform generated an android project using the following command:

ionic platform add android  

This has been done successfully, Now i am importing tha android project to android studio but getting the following error related with gradle.

FAILURE: Build failed with an exception.

* What went wrong:
Task '' not found in root project 'android'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.   

Following are the contents of build.gradle file available in cordovaLib folder
enter image description here

So if am i missing something while importing project or build.gradle needs to be updated?

I figured out the thing that was going wrong. I imported the ionic project that i created from CLI to Android studio.

There i got two seperate build.gradle files in ionic project. One was in the root android project and other one was in CordovaLib project. In both the gradle files buildToolVersion was being identified at the run time. So may be Android Studio was unable to resolve the build version.

Setting hardcoded build version to "19.1" and SDK version to 21 fixed the issue.