Anvesh
Anvesh

Reputation: 13

Updated Android_HOME variable Ionic Issue

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

Home to update the ANDROID_HOME variable?

Upvotes: 0

Views: 811

Answers (2)

Lycwed
Lycwed

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

David Cruz
David Cruz

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

Related Questions