Error in Cordova project execution command after Android studio upgrade: could not find gradle wrapper within Android SDK

After upgrading Android Studio to 2.3.1 today, the Cordova project execution command reported “Error:Could not find Gradle Wrapper within Android SDK”. Details are as follows:

Trunk1 Sudo Cordova builds Android
ANDROID_HOME=/Users/fxp/Library/Android/sdk
JAVA_HOME =/Library/Java/JavaVirtualMachines jdk1.8.0 _92. JDK/Contents/Home
Reading build config file: /Users/fxp/Desktop/trunk1/build.json
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /Users/fxp/Library/Android/sdk/tools/templates/gradle/wrapper

According to the prompt, I went to check FXP/Users/Library/Android/SDK/tools/templates/gradle/wrapper directory, execute the command:

cd  /Users/fxp/Library/Android/sdk/tools/templates/gradle/wrapper

Just found that this directory does not exist. So I went to check my SDK and found that there was no Templates folder in the SDK/Tools directory! It seems that SDK Tools also need to be updated after Android Studio is updated to version 2.3.1.
Then I go to http://www.androiddevtools.cn to download the SDK Tools, after download decompression, the templates folder is copied to the SDK Tools directory, cordova command will no longer quote this error again.

Read More: