14

I'm trying to run AVD/SDK manager from Android Studio. Each time the dialog pops up.

AlertDialog

It's strange because i'm already specified Android SDK.

Android SDK selected

Is there any another place where i should add Android SDK path ? Thanks

p37td8
  • 1,287
  • 2
  • 9
  • 20

9 Answers9

29

I do not use Android studio, but suppose you need specify SDK in Modules scection

enter image description here

Georgy Gobozov
  • 13,633
  • 8
  • 72
  • 78
29

Simply perform these 3 steps

  1. Open gradle.buld in your app module
  2. Change minSdkVersion and sync gradle
  3. Revert back your minSdkVersion and sync gradle again
7

For me, in the wake of a Windows Easy Transfer that didn't 100% work, the answer was to do the following, and the key step is in bold:

  1. File->Close Project
  2. Click "Configure"
  3. Click "SDK Manager"
  4. Select the appropriate Android API, e.g., "Android 4.3 (API 18)" for the project
  5. While you're here, also select the appropriate Android SDK Build-tools, e.g., 18.1.1
  6. Click "Install packages..."
  7. Close out and reopen your project, and you should have no problem accessing the SDK Manager via Tools->Android->SDK Manager

Note: You can determine which versions of the Android SDK and SDK Build-tools you need by inspecting your build.gradle file. In my case, I had the following lines:

compileSdkVersion 18
buildToolsVersion "18.1.1"

My experience is somewhat peculiar, because I recently migrated from Windows 7 to Windows 8.1 using Windows Easy Transfer. When I did this, my local git repository and some of my Android Studio settings transferred over, but apparently not everything. When I installed Android Studio on the new machine, I set my ANDROID_HOME environment variable, then opened Android Studio, and it immediately put me in the project I had most recently opened on the old machine. My fresh install of Android Studio didn't include the Android 4.3 SDK, and it seems that jumping straight into the project threw SDK Manager for a loop.

Prior to performing the above sequence of steps, I confirmed that my ANDROID_HOME was correctly set. I also tried setting the project default SDK, as described here: https://stackoverflow.com/a/18409923/315702. AND I tried setting the SDK within the Project Structure of the project that was giving me trouble. None of these things fixed my particular problem.

Community
  • 1
  • 1
Mark McClelland
  • 4,980
  • 4
  • 35
  • 48
7

I fixed the issue by setting correct android sdk Android Studio->project structure->Modules(app)->properties tab-> set the correct SDK

Deepika
  • 516
  • 4
  • 6
4

You can simply tap Sync Gradle

enter image description here

Nice and Clean !!!

Kiran Benny Joseph
  • 6,755
  • 4
  • 38
  • 57
3

For me, what did the trick was changing the compileSdkVersion 19 to compileSdkVersion "Google Inc.:Google APIs:19" so it uses the Google API platform instead of just the 19 platform.

Juan Reyes
  • 404
  • 5
  • 9
  • FWIW: For me it was the opposite. I had to change 'Google Inc.:Google APIs:14' to just 14. I guess it depends on what your sdks folder says. I'm using a Mac. – Adam Mendoza Jul 13 '16 at 09:01
1

Right click on your project and select Project Structure, on left hand select sdks and in right panel browse your sdk from sdk folder like (adt-bundle-windows-x86_64-20131030 folder for Windows)

psiyumm
  • 6,437
  • 3
  • 29
  • 50
Azade Rahmati
  • 135
  • 1
  • 5
1

For me even simpler steps worked:

  1. Open buld.gradle in app module
  2. Add a space or newline on any line's end
  3. Sync gradle

Note I am on Android Studio 2.x , but solution should hold for earlier versions of android studio as well

ishandutta2007
  • 16,676
  • 16
  • 93
  • 129
0

My environment is not exactly same as yours. I am using Android Studio 0.5.2 (android-studio-bundle-130.737825-windows.exe). I also met the "Please specify the Android SDK" message as your screenshot.

After some investigation, I notice the "SDK Manager" binary was missing in the Android Studio. Then I installed adt-bundle-windows-x86_64-20130917.zip. In Android Studio - File - Project Structure - Android SDK - Android SDK location, fill in the folder for adt-bundle-windows-x86_64-20130917\sdk. And everything was OK.

Qi Luo
  • 841
  • 10
  • 15