Reputation: 13
There is an issue with the path. Android Studio SDK is present in my D drive. When I execute the build command I get the following error "Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: C:\Users\Max\AppData\Local\Android\sdk\tools\templates\gradle\wrapper"
Actual SDK location is in "D:\Users\Max\AppData\Local\Android\sdk\tools\templates\gradle\wrapper". What should I change in Ionic app such that it looks for SDK in D drive?
Here is the Log
C:\Users\Max\Desktop\Gre\demo\demoApp>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Max\Desktop\Gre\demo\demoApp\hooks\after_prepare\010_add_platform_class.js C:\Users\Max\Desktop\Gre\demo\demoApp
add to body class: platform-android
ANDROID_HOME=C:\Users\Max\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_121
Subproject Path: CordovaLib
Where: Script 'C:\Users\Max\Desktop\Gre\demo\demoApp\platforms\android\CordovaLib\cordova.gradle' line: 64
What went wrong: A problem occurred evaluating root project 'android'.
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Home to update the ANDROID_HOME variable?
Upvotes: 0
Views: 811
Reputation: 16
Get just the command line tools here : https://developer.android.com/studio/index.html#downloads
Next unzip, copy/paste 'templates' folder in '.../Android/sdk/tools/'
Upvotes: 0
Reputation: 11
Unzip -> copy and paste "tools" >only "templates" folder to your project folder (/Libraries/Android/sdk/tools/)
Example: C:\Users\yourUsers\AppData\Local\Android\sdk\tools
Link http://tools.android.com/recent/androidsdktoolsrevision2530feb2017
Upvotes: 1