android-studioandroid-virtual-device

Can't locate Android SDK installation directory for the AVD .ini file


I am getting this error when trying to create a new AVD:

enter image description here

This is the idea log file:

2022-04-05 14:01:12,132 [ 207201] WARN - vdmanager.AvdManagerConnection - com.android.prefs.AndroidLocationsException: Can't locate Android SDK installation directory for the AVD .ini file.

My Environment Variables are the following:

ANDROID_AVD_HOME=E:\AndroidStudioSDK

ANDROID_SDK_HOME=E:\AndroidStudioSDK

ANDROID_SDK_ROOT=E:\AndroidStudioSDK

I don´t know which .ini file is looking for.

These are the SDK platforms installed:

enter image description here

This is what I have in SDK Tools: enter image description here

I tried uninstalling and installing Android studio again with no different results.

How to fix this error?

by the way: I am not running any project, I simply want to create the Virtual Device.


Solution

  • I get same alert because set error environment variables, setting ANDROID_SDK_HOME to the .android directory may be useful, these are my environment variables:

    ANDROID_AVD_HOME=D:\Android\.android\avd

    ANDROID_SDK_HOME=D:\Android\.android

    ANDROID_SDK_ROOT=D:\Android\Sdk