In my case, the project with cordova android platform version 4.1.1 (For example Cordova CLI version 5.2.0) works, the Android Studio can build the project.
However, the project with cordova android platform version 5.1.1 (For example Cordova CLI version 6.2.0) has the issue, the Android Studio can not build the project because the Gradle sync brings the error such as
exception during working with external system: ndk
The critical difference between 4.1.1 and 5.1.1 is the build.gradle file.
In 4.1.1 the build.gradle file choose appropriate gradle version and android plugin version. (like gradle version 2.2 and plugin version 1.0.0+).
In 5.1.1 the build.gradle file does not do such a thing.
I fix this issue by manually setting the gradle version to 2.2 and plugin version 1.0.0. This can be done in the Android studio by opening the dialog
File > Project Structure > Project
.