Hello! I have an issue when I execute "ionic Cordova build android"
I have the next error:
Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova build android (exit code 1):
ANDROID_HOME=/usr/local/share/android-sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /usr/local/share/android-sdk/tools/templates/gradle/wrapper
I have downloaded the Gradle Binary Only Distribution from https://gradle.org/gradle-download/
I copy the folder in my Development directory and I have a new variable “GRADLE_HOME” in my bash_profile, so my file bash_profile is like this:
export ANDROID_HOME=/usr/local/share/android-sdk
export PATH=${PATH}:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
export JAVA_HOME=/usr/libexec/java_home
export GRADLE_HOME=~/Development/gradle-3.5/bin
Somebody know how can I fix the error?
Thanks in advance!!
- I have fixed the problem installing SDK with Android studio, not executing “brew cask install android-sdk”.