Android SDK location
Asked Answered
R

19

201

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?

Retainer answered 7/8, 2014 at 7:29 Comment(4)
some helps for you #5673062Gesualdo
where you installed your SDk give that pathMajor
The path to the SDK you're specifying is indeed the correct path. Is it possible the SDK-install got damaged in some way? Have you tried reinstalling the SDK? Same question for Xamarin?Sophey
It is usually C:\Users\**username**\AppData\Local\Android\sdkSwedenborgian
G
74

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.

Glaciology answered 7/8, 2014 at 15:14 Comment(3)
I usually don't consider my username as a secret.Calyx
Even if it's something very offensive? ( actually i have no idea why i scribbled it out, but i'm glad people appreciate my fine computer art )Glaciology
The menu is File > SettingsCemetery
G
239

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

Graecize answered 31/12, 2015 at 6:2 Comment(4)
he is trying to locate sdk for xamarin.Teahouse
its android studio youre usingTeahouse
You can just copy-paste this if you have installed Android Studio with Android SDK %localappdata%\Android\sdkVesperal
Tools->Android->SDK Manager if you cannot find the icon.Brei
G
74

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.

Glaciology answered 7/8, 2014 at 15:14 Comment(3)
I usually don't consider my username as a secret.Calyx
Even if it's something very offensive? ( actually i have no idea why i scribbled it out, but i'm glad people appreciate my fine computer art )Glaciology
The menu is File > SettingsCemetery
A
67

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

Assiniboine answered 5/7, 2016 at 0:30 Comment(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-sdkRacemose
D
15

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

enter image description here

Darton answered 22/8, 2016 at 18:50 Comment(0)
U
13

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

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

Unreeve answered 13/9, 2016 at 13:41 Comment(0)
V
10

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

Vervain answered 28/7, 2017 at 15:22 Comment(0)
D
7

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

Dulcine answered 3/9, 2020 at 2:45 Comment(0)
H
6

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"
Homiletics answered 28/4, 2019 at 3:35 Comment(1)
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.Homiletics
H
4

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.

Historiography answered 3/6, 2018 at 17:14 Comment(1)
You saved my day with --verbose. After installing sdkmanager via homebrew on a Mac I couldn't for the life of me figure out where it put the things it was installing.Kannry
H
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.

Halfassed answered 25/7, 2015 at 5:27 Comment(0)
R
3

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.

Raddatz answered 8/10, 2016 at 15:44 Comment(1)
You can access the local folder imminently instead of folder travelsal %localappdata%AndroidNorword
D
2

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.

Dacca answered 29/8, 2016 at 7:20 Comment(1)
Another useful approach might be to search the environment PATH, as seen here: csharptest.net/526/…Dacca
D
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.

Durmast answered 19/8, 2018 at 14:27 Comment(0)
G
1

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

Gabrielagabriele answered 25/9, 2016 at 2:37 Comment(2)
What value is your answer adding? There is almost exactly the same answer already.Vernalize
I like this answer because it is articulate. : )Icterus
S
1

For Mac OS Catalina with zsh:

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

restart the terminal and voila :)

Starks answered 11/10, 2019 at 14:43 Comment(0)
C
1

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

Clougher answered 7/12, 2020 at 18:1 Comment(1)
Please explain the difference of your recommended solution to the existing older and upvoted answer by Pankaj.Soapsuds
A
1

make sure you have the correct '/', sometimes it doesn't work with ''. It is in that way windows copies it as part of locals paths

Antilogy answered 27/7, 2022 at 21:6 Comment(0)
A
1

In my case changing the region language to the United State was a main factor in the solution.

the steps: 1- Change the region language to the United State

2- Download the android SDK manually and put it in the following path: C:\Users\PC\AppData\Local\Android\Sdk

3- install the SDK from Android Studio

Note: AppData is hidden by default

you can find the steps in details and links to download the SDK here

Arcboutant answered 27/8, 2022 at 14:38 Comment(0)
G
0

Now you can find SDK path here: enter image description here

Glasgow answered 18/10, 2023 at 14:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.