Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you add an SDK to Android Studio?

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

like image 949
Mason G. Zhwiti Avatar asked May 16 '13 18:05

Mason G. Zhwiti


People also ask

Where does Android Studio install the SDK?

by default, the "Android Studio IDE" will be installed in " C:\Program Files\Android\Android Studio ", and the "Android SDK" in " c:\Users\username\AppData\Local\Android\Sdk ".

Does Android Studio automatically install SDK?

Auto-download missing packages with Gradle When you run a build from the command line, or when using Android Studio 3.3 or later, Gradle can automatically download missing SDK packages that a project depends on, as long as the corresponding SDK license agreements have already been accepted using the SDK Manager.

Do I need to install all SDK in Android Studio?

No, You don't need to install everything. Install the "SDK Platform" for the Android versions you've set as minimum, target, and in-between the minimum & target. The Android SDK Extras are usually not required; but it is useful to be aware of them since they may be required depending on your use case.

What is the SDK in Android Studio?

The Android SDK is a software development kit that includes a comprehensive set of development tools. These include a debugger, libraries, a handset emulator based on QEMU, documentation, sample code, and tutorials.


2 Answers

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

like image 171
Mason G. Zhwiti Avatar answered Sep 20 '22 02:09

Mason G. Zhwiti


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/ 
like image 31
apollosoftware.org Avatar answered Sep 23 '22 02:09

apollosoftware.org