In my case, a project with version 4.1.1 (for example, Cordova CLI version 5.2.0) for android cordova, Android Studio version can create a project.
However, a project with version 5.1.1 (for example, Cordova CLI version 6.2.0) from Cordova, Android Studio version cannot build the project, because Gradle synchronization leads to an error, for example,
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 selects the appropriate version of the Gradle version and the Android version. (e.g. Gradle version 2.2 and plugin version 1.0.0 +).
In 5.1.1, the build.gradle file does not.
I fix this problem by manually installing the Gradle version to version 2.2 and the plugin version 1.0.0. You can do this in Android Studio by opening the File > Project Structure > Project dialog box.
source share