8

Error: SDK Validation ANDROID_SDK_HOME is set to the root of your SDK: C:\Users\Ali Asadullah\AppData\Local\Android\sdk This is the path of the preference folder expected by the Android tools.It should NOT be set to the same as the root of your SDK. Please set it to a different folder or do not set it at all.If this is not set we default to: C:\Users\ I have updated to all the new updates. But still the issue is there. Error: Android Studio 3.1.4

Ali Asadullah Shah
  • 85
  • 1
  • 1
  • 12

3 Answers3

8

In android studio the ANDROID_SDK_HOME environment variable is deprecated,just delete it.

please open "project structure" (press ctrl+shift+alt+s in windows) and set as below fig shown: enter image description here

navylover
  • 12,383
  • 5
  • 28
  • 41
5

FOR PEOPLE GETTING ERRORS AFTER ARCTIC FOX UPDATE ON MAC: For me the error was corrected by editing my bash_profile. (Please remember to do a backup before you start editing this as it can lead to some headaches.)

This was set in the profile ANDROID_SDK_HOME=/Users/$USER/Library/Android/sdk

Delete this line - close and restart Android Studio and you no longer have a wrong folder reference.

madsa42
  • 61
  • 1
  • 2
  • And restart the stupid Android Studio after doing your vim ~/.bash_profile It does not clear the cache for whatever reason despite the terminal in android studio not showing anything for echo $ANDROID_SDK_HOME no more – ideerge Aug 25 '23 at 16:47
-1

In my scenario, it is caused by the mysterious environment variable, aka ANDROID_SDK_HOME.

As Android Studio told us, we should not set it. It's deprecated. I know, but what's interesting is I didn't set it at all! It cannot be found here

Windows envrionment variable settings

However, when you run

echo %ANDROID_SDK_HOME%

in cmd(not support in PowerShell), it appears and it is pointed to the root of my SDK!!! It is in Reg table, probably.

So as the simplest solution, you can add a ANDROID_SDK_HOME variable to override it.

Set ANDROID_SDK_HOME in environment variable settings

echo %ANDROID_SDK_HOME% again to check the overriding.

孙振义
  • 1
  • 2