44

I'm using Google's Android Studio 0.1 based on IntelliJ, and I cannot figure out how to add additional SDKs to my project.

I exported my existing project from Eclipse to a Gradle project, which I imported into Android Studio, as recommended by Google.

My project's SDK is Google APIs 2.3.3. However, I use a library called PullToRefresh which appears to need SDK 4.1, so I'm trying to add the SDK 16 to my project.

I've already made sure to download the SDK using the SDK manager. These SDKs are added to the Android Studio.app's sdk folder automatically.

I opened the Project Structure window, clicked "SDKs" under Platform Settings, and I currently see JDK 1.7 and Google APIs 2.3.3 shown. I click the + sign above that list to add a new SDK. I then navigate to the sdk directory that has android-16, as shown in the screenshot below. I am not quite sure what this wants me to add, but I've highlighted the android-16 folder (about the only thing I can select), and when I click "Choose," the window disappears, but no new SDK appears in the SDK list.

Screenshot of the SDK chooser

And here is a screenshot of my SDK Manager view, showing the installed SDKs:

Screenshot of SDK Manager

8 Answers 8

24

I had opened a ticket also with Google's support, and received the solution. Instead of choosing the sdk/platform/android-16 folder, if you select the top-level "sdk" folder instead, you'll then be asked to choose which SDK you want to add. This worked!

enter image description here

enter image description here

5
  • On what version did this work for you? Selecting the sdk folder for me does nothing
    – nduplessis
    Jun 4, 2013 at 9:17
  • @nduplessis This was working on the first public beta of Android Studio on Mac OS X. I haven't had to do an import since so I don't know if it changed? You're clicking on the SDK folder while you're in Android Studio, right? So you: open the Project Structure window, click "SDKs" under Platform Settings, click the + sign above that list to add a new SDK. Navigate to the sdk directory within the Android Studio.app folder. Choose the sdk folder and hit "Choose." If it's not prompting you, make sure you've downloaded some SDKs via the SDK manager first... Jun 4, 2013 at 16:55
  • 3
    There is a clear useability problem here that needs to be fixed
    – kwahn
    Sep 6, 2013 at 15:44
  • You can learn the detailed steps,here
    – App Crazy
    Mar 9, 2016 at 14:46
  • Amazing... I had almost killed myself trying to figure out this one. Thanks a ton (Y) @Mason
    – qre0ct
    Jun 21, 2016 at 17:48
8

You have to put your SDK's in a given directory or .app directory. You have to do it in finder while you are out of the application i'm assuming, but personally I'd use terminal in Mac instead of doing it in the App itself or finder. According to Google:

On Windows and Mac, the individual tools and other SDK packages are saved within the Android Studio application directory. To access the tools directly, use a terminal to navigate into the application and locate the sdk/ directory. For example:

 Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\
 Mac: /Applications/Android\ Studio.app/sdk/
5
  • If you see my screenshot, you can see the SDK packages are already installed. The issue is how do I get Android Studio to "see" those additional packages and allow my app to utilize them? The only one I can see is the original one I started with, SDK 2.3.3. May 16, 2013 at 18:29
  • Is everything looking good in SDK Manager? That's strange, because I'm using the same thing in Windows, and I it lets me add the libraries like you are doing. Something is amiss. Try looking in SDK Manager, or Eclipse and make sure you can access 4.1 May 16, 2013 at 18:33
  • Yep, I used SDK Manager (launched from within Android Studio) to download the additional SDKs, such as SDK 16. I'll add a screenshot of what I see now in SDK Manager. May 16, 2013 at 18:36
  • It's like the application is not registering the new SDK. It's in beta so I'm not too surprised migrating from older versions to newer ones. Try closing out of everything and jumping back in, this would be an ideal Windows solution, but I'd hate to say Mac usually doesn't have problems like that, typically. May 16, 2013 at 18:39
  • As a workaround to the UI issue for adding SDKs (at least on Mac), is there a .xml file I can find somewhere within Android Studio that I could edit, to add in what is needed for it to see the additional SDKs? May 16, 2013 at 18:39
4

You can change from the "build.gradle" file the line:

compileSdkVersion 18

to the sdk that you want to be used.

3

I had to restart Android Studio for changing the sdk after installing a new one. Then Android Studio asked me for configuring my SDK and let me do it.

2

And For linux(ubuntu)

/usr/share/android-studio/data/sdk

1

Download your sdk file, go to Android studio: File->New->Import Module

0

I followed almost the same instructions by @Mason G. Zhwiti , but had to instead navigate to this folder to find the SDK:

/Users/{my-username}/Library/Android/sdk

I'm using Android Studio v1.2.2 on Mac OS

0

For those starting with an existing IDEA installation (IDEA 15 in my case) to which they're adding the Android SDK (and not starting formally speaking with Android Studio), ...

Download (just) the SDK to your filesystem (somewhere convenient to you; it doesn't matter where).

When creating your first project and you get to the Project SDK: bit (or adding the Android SDK ahead of time as you wish), navigate (New) to the root of what you exploded into the filesystem as suggested by some of the other answers here.

At that point you'll get a tiny dialog to confirm with:

Java SDK:     1.7            (e.g.)
Build target: Android 6.0    (e.g.)

You can click OK whereupon you'll see what you did as an option in the Project SDK: drop-down, e.g.:

Android API 23 Platform (java version "1.7.0_67")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.