Search code examples
androidcordovaionic-frameworkgenymotion

Error: Android SDK not found with ionic run android


I have try to debug fro a few days. I want to run ionic code with Genymotion as emulator. I am using windows 10. My C drive is run out of space and I installed everything in D drive.

However, when I run ionic run android, I get the Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.

I have the SDK directories as below: [![enter image description here][1]][1][![enter image description here][2]][2][![enter image description here][3]][3]

I also set the Environment Variables with ANDROID_HOME and its path [![enter image description here][4]][4][![enter image description here][5]][5]

Besides, I also try numerous way to set the path as below, but all still fail with same error.

D:\sdk-tools-windows-3859397\tools and D:\sdk-tools-windows-3859397\platform-tools

D:\sdk-tools-windows-3859397\platform-tools only

ANDOIRD_HOME set to D:\sdk-tools-windows-3859397\

remove ANDROID_HOME and set path D:\sdk-tools-windows-3859397\platform-tools and D:\sdk-tools-windows-3859397\tools

The adb is working and able to detect the device in genymotion [![enter image description here][6]][6]

I think I have try almost everything but still see the error. Please advice how to make it work. If I run only ionic serve, there is no error.


Solution

  • See this link:

    http://www.360logica.com/blog/how-to-set-path-environmental-variable-for-sdk-in-windows/

    Or open command prompt and exec:

    set ANDROID_HOME=D:\sdk-tools-windows-3859397
    
    set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools