Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic can't find ANDROID_HOME on Windows 10

Im using Ionic to build an Android app and I'm finding a problem that I cant work around or find an answer to. When I run ionic build android or ionic emulate android I get the following:

Error: Failed do find 'ANDROID_HOME'...

I believe I have added the correct variables to PATH and ANDROID_HOME under System Variables, but please check: https://i.sstatic.net/LmGPW.jpg

The first image is ANDROID_HOME, the second shows where the sdk is located, the third is the Error itself and the fourth is my path variable.

I run it from Git Bash. Running as an administrator did not make any difference, I also tried reinstalling Android SDK (with Android Studio) in a different folder (was in %HOME%\AppData\Local\Android\ before) without any difference. Also tried to reboot after reinstalling SDK.

I also tried to run the SDK Manager first (C:\Android\sdk\tools\android.bat) and keeping it open while trying to build or emulate, but it still didn't work.

like image 778
BluePrint Avatar asked Dec 12 '25 03:12

BluePrint


1 Answers

You need to create a new system variable called ANDROID_HOME and as a value put the path to the android SDK installation directory.

enter image description here

enter image description here

For more information, please refer to the installation guide.

like image 132
Pylyp Lebediev Avatar answered Dec 13 '25 21:12

Pylyp Lebediev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!