147

I have Xamarin Studio, and I need to specify the Android SDK Location. I have previously had Xamarin Studio working on my pc, and for some reason, I need to enter this again.

I have entered the following location:

C:\Users\**username**\AppData\Local\Android\android-sdk

Xamarin Studio does not accept this location and displays the following message:

No SDK found at the specified location

This location has platform-tools and other SDK folders.

Why is this not working, and what should I do?

A-Sharabiani
  • 13,270
  • 12
  • 87
  • 109
user3736648
  • 6,783
  • 17
  • 67
  • 145

16 Answers16

180

Update v3.3

enter image description here

Update:

Android Studio 3.1 update, some of the icon images have changed. Click this icon in Android Studio.

enter image description here

Original:

Click this icon in Android Studio for the Android SDK manager

enter image description here

And your Android SDK Location will be here enter image description here

luckyging3r
  • 2,333
  • 2
  • 13
  • 33
68

Do you have a screen of the content of your folder? This is my setup:

Xamarin

Folder

I hope these screenshots can help you out.

Chris
  • 3,259
  • 1
  • 29
  • 42
61

The Android SDK path is usually C:\Users\<username>\AppData\Local\Android\sdk.

David Ferenczy Rogožan
  • 18,863
  • 8
  • 68
  • 65
busetekin
  • 756
  • 6
  • 10
  • 1
    This varies. My android studio points to the directory that you have published. However if I just open SDK manager. It points to `\android-sdk` – Zapnologica May 10 '17 at 05:38
14

Try to open the Android Sdk manager and the path would be displayed on the status bar.

enter image description here

DᴀʀᴛʜVᴀᴅᴇʀ
  • 4,253
  • 12
  • 46
  • 84
Raj Asapu
  • 404
  • 5
  • 11
9

If you only installed Xamarin with Visual Studio setup, the android SDK location is :

C:\Program Files (x86)\Android\android-sdk

You can find it in Android SDK Manager as said Raj Asapu

In visual Studio : Android SDK Manger from Visual Studio

Note : you should not use Program Files path to install Android Studio due to the space in path ! Android studio setup after Xamarin

scrat789
  • 2,691
  • 3
  • 26
  • 24
7

The default location for Android sdk(s) on a Mac is:

/Users/*username*/Library/Android/sdk

Pankaj
  • 81
  • 1
  • 3
5

On 28 April 2019 official procedure is the following:

  1. Download and install Android Studio from - link
  2. Start Android Studio. On first launch, the Android Studio will download latest Android SDK into officially accepted folder
  3. When Android studio finish downloading components you can copy/paste path from the "Downloading Components" view logs so you don't need to type your [Username]. For Windows: "C:\Users\ [Username] \AppData\Local\Android\Sdk"
  • I skipped step 2 myself as I though by installing Android studio you will get SDK as well, but that is not the case. You must start studio to finish installation. – Constantin Zagorsky Apr 28 '19 at 03:36
3

Have you tried to find this folder via the Windows explorer? Can it been seen? Maybe the folder is hidden (by default install - it is hidden by the Windows operating system in the users folder). Just check that you can view hidden folders in Windows explorer (by the settings in the windows control panel > appearance and personalization > folder options > show hidden files and folders.

This happened to me as the Windows OS could not find the SDK folder which was required for the Android Studio SDK path, and was resolved by showing hidden files and folders, which enabled me to complete the default SDK install path location.

3

The question doesn't seem to require a programmatic solution, but my Google search brought me here anyway. Here's my C# attempt at detecting where the SDK is installed, based on the most common installation paths.

static string FindAndroidSDKPath()
{
    string uniqueFile = Path.Combine("platform-tools", "adb.exe"); // look for adb in Android folders
    string[] searchDirs =
    {
        // User/AppData/Local
        Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
        // Program Files
        Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
        // Program Files (x86) (it's okay if we're on 32-bit, we check if this folder exists first)
        Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + " (x86)",
        // User/AppData/Roaming
        Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
    };
    foreach (string searchDir in searchDirs)
    {
        string androidDir = Path.Combine(searchDir, "Android");
        if (Directory.Exists(androidDir))
        {
            string[] subDirs = Directory.GetDirectories(androidDir, "*sdk*", SearchOption.TopDirectoryOnly);
            foreach (string subDir in subDirs)
            {
                string path = Path.Combine(subDir, uniqueFile);
                if (File.Exists(path))
                {
                    // found unique file at DIR/Android
                    return subDir;
                }
            }
        }
    }
    // no luck finding SDK! :(
    return null;
}

I need this because I'm writing an extension to a C# program to work with Android Studio/Gradle. Hopefully someone else will find this approach useful.

monkey0506
  • 2,236
  • 1
  • 19
  • 25
  • Another useful approach might be to search the environment PATH, as seen here: http://csharptest.net/526/how-to-search-the-environments-path-for-an-exe-or-dll/index.html – monkey0506 Aug 19 '17 at 18:44
2

press WIN+R and from the run dialog run dialog Execute the following: **%appdata%..\Local\Android**

You should now be presented with Folder Explorer displaying the parent directory of the SDK.

2

If you can run the "sdkmanager" from the command line, then running sdkmanager --verbose --list will reveal the paths it checks.

For example, I have installed the SDK in c:\spool\Android and for me running the sdkmanager --verbose --list looks like:

enter image description here

>sdkmanager --list --verbose
Info: Parsing c:\spool\Android\build-tools\27.0.3\package.xml
Info: Parsing c:\spool\Android\emulator\package.xml
Info: Parsing c:\spool\Android\extras\android\m2repository\package.xml
Info: Parsing c:\spool\Android\extras\intel\Hardware_Accelerated_Execution_Manager\package.xml
Info: Parsing c:\spool\Android\patcher\v4\package.xml
Info: Parsing c:\spool\Android\platform-tools\package.xml
Info: Parsing c:\spool\Android\platforms\android-27\package.xml
Info: Parsing c:\spool\Android\tools\package.xml
Installed packages:=====================] 100% Computing updates...
--------------------------------------
build-tools;27.0.3
    Description:        Android SDK Build-Tools 27.0.3
    Version:            27.0.3
    Installed Location: c:\spool\Android\build-tools\27.0.3

P.S. On another PC I let the Android Studio install the Android SDK for me, and the SDK ended up in C:\Users\MyUsername\AppData\Local\Android\Sdk.

ArtemGr
  • 9,567
  • 2
  • 44
  • 75
2

If you have downloaded sdk manager zip (from https://developer.android.com/studio/#downloads), then you have Android SDK Location as root of the extracted folder.

So silly, But it took time for me as a beginner.

Anand Varkey Philips
  • 1,271
  • 17
  • 34
2

When you first time install Android Studio Setup, you can also see the SDK folder. For me it is:

C:\Users\{USERNAME}\AppData\Local\Android\sdk

enter image description here

Chau Giang
  • 829
  • 4
  • 19
0

I found it here C:\Users\username\AppData\Local\Android\sdk .

c.r suthar
  • 41
  • 1
  • 4
0

For Mac OS Catalina with zsh:

echo '\nexport PATH="$PATH":"$HOME/Library/Android/sdk"' >> $HOME/.zshrc

restart the terminal and woala :)

kreld
  • 652
  • 1
  • 5
  • 15
Shorny
  • 21
  • 2
0

Just add a new empty directory that path is “/Users/username/Library/Android/sdk”. Then reopen it.

  • Please explain the difference of your recommended solution to the existing older and upvoted answer by Pankaj. – Yunnosch Dec 07 '20 at 23:51