ANDROID_HOME=/Users/vikin/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /Users/vikin/Library/Android/sdk/tools/templates/gradle/wrapper
The same happens to me. Compiliation and emulation works on Android studio, but ends with the error when using cordova run android or ionic emulate android. I use example project. Before I had an error about Gradle version (so I changed it to 3.3):
Error: /Users/daniel/Applications/Angular2/myApp/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred evaluating root project âandroidâ.
Failed to apply plugin [id âcom.android.applicationâ]
Minimum supported Gradle version is 3.3. Current version is 2.14.1. If using the gradle wrapper, try editing the distributionUrl in /Users/daniel/Applications/Angular2/myApp/gradle/wrapper/gradle-wrapper.properties to gradle-3.3-all.zip
What went wrong:
A problem occurred evaluating root project âandroidâ.
Failed to apply plugin [id âcom.android.applicationâ]
Gradle version 2.2 is required. Current version is 3.3. If using the gradle wrapper, try editing the distributionUrl in /Users/daniel/Applications/Angular2/myApp/gradle/wrapper/gradle-wrapper.properties to gradle-2.2-all.zip
But then I changed gradle version in platform/android/build.gradle and platform/android/cordova/lib/builders/GradleBuilder.js (like described here) and it finally works! Thanks.
Hi!, hi solve the problem installing âGradleâ in my computer from the oficial website.
Add the /bin folder to the Environment variable PATH, check it typing âgradle -vâ at your bash.
Then create a folder oin your skd/tools call it â/templates/gradle/wrapperâ then execute inside â/wrapperâ the system bash and type âgradle wrapperâ. When the process finish, all wheel ok!
really like solution of "cserenissimo"
to recap, make sure âlocally installedâ âgradleâ (at least 3.2?) is on your $PATH
$ cd $ANDROID_HOME/tools
$ mkdir -p templates/gradle/wrapper
$ cd templates/gradle/wrapper
$ gradle wrapper  // this installs the needed âstuffâ
âŚ
$ cd ${myIonicProjectHome}
$ ionic run android -lc  // livereload + console-log
@techsnake, If you update to latest Android version, you will be forced to install Android Studio, Tools is within the start menu (Configure > Settings > System Settings > Android SDK) and inside that page (Tab SDK Tools). Screenie:
Can you eplain this a little bit more ? where to download where is th android tool directory . I am really fed up and tired to solve this problem 3 days
Google it, download android studio. It changed name a few monthes ago (and Android Tools are now part of Android Studio). For a clean update, uninstall your Android tools setup, and then install Android studio. For the files location, look at my screenshot above, taken from Android Studio.