Android folder contains 2 sdk folders

2

1

Why do I have two sdk folders in the Android directory:

enter image description here

Contents of both sdk folders looks same

enter image description here

But actually they are different in size , files and folders.

enter image description here

Should I remove any of these folders? Are both sdk folders being used by Android?

Akash Kumar

Posted 2016-02-06T02:59:00.853

Reputation: 345

How did you install/update the Android SDK? Why is it installed to this location? – Daniel B – 2016-02-08T19:38:54.290

Downloaded Android Studio and then simply installed with default settings... – Akash Kumar – 2016-02-08T19:52:24.870

I suggest to uninstall Android Studio, remove both folders (if left-over), then reinstall. If you again have 2 folders, then this is the way this SDK installs. – harrymc – 2016-02-09T10:05:08.837

Did you not update the SDK? Looks like this would cause this to happen... The creation date is quite different on the two folders also. – LJD200 – 2016-02-09T16:40:43.637

Answers

4

A question on StackOverflow has a somewhat useful comment on this:

As of today (2015-10-01), the standard download in @RandollREVERS solution comes with the sdk (but you can also use that link to find the sdk standalone package). I needed to create the path variable for it (suprised Android didn't do this for me) after downloading the studio and then another path variable for the platform-tools directory where the adb command is located. Each time the sdk package is downloaded, the entire folder is enumerated under your Android install directory (\sdk, \sdk1...).

Additionally, this link at code.google.com shows someone having an issue installing the SDK, and having 6 different folders for this:

enter image description here

It simply appears that each time the SDK is installed, it will create a new, incremented folder from the last.

To test this, I've just installed it:

enter image description here

enter image description here

Only one SDK folder is present after applying all the updates. As such, I'd assume only one of your folders is being used and is required, and the other is just a previous installation. To find out what is actually being used, go to Configure, then SDK Manager. In here it'll tell you the path actually being used:

enter image description here

I'd then try renaming the one not mentioned here to something different and see if there are any adverse effects whilst using it for a few days. If not, I'd assume it's safe to delete, or update any other paths you may have to the new one.

Edit: I have just tried reinstalling Android Studio without uninstalling the old version, and the defaults it gives me include a 1 as a suffix:

enter image description here

Jonno

Posted 2016-02-06T02:59:00.853

Reputation: 18 756

0

Uninstalling AS, removing folders, and reinstalling AS is a lot of time and stress and what about customizations? Is it guaranteed they'll all be saved? A power user will have a whole lot of different types relating to different parts of the IDE, including IntellIJ IDEA/JetBrains.

Rather than un- and re-install, I always try to figure out a way to get around this iffy proccess.

The original sdk and sdk ? (? = 1,2,3,..,n) contain different numbers of identically-named folders depending on options selected in each installation. The last one (sdk n) will have later folder dates than the others.

EDIT

The following is NOT NECESSARILY a good way around un- and re-installing AS (original post 9/2/18 about 5pm EDT):

End Edit


"I'd move all the sdk i (i < n) to another folder (each folder move takes little time if moved to same drive).

"Then rename sdk n to plain old sdk and there should be no problems."

(Original post ends here.)


There's nothing wrong with that advice if you do all development on actual devices and have no use for old emulators.

And the only problem would be that you'd lose all the previous versions/upgrades of the build tools for emulators that you may have installed, thereby causing yourself to have to re-install all of the older ones if you felt the need to.

Here's the difference between my "original" sdk folder and my "newer" sdk1:

enter image description here

I've decided to put sdk back on the Desktop and just let sdk1 accumulate new emulator tools as I decide to download them. (I'm not going to rename it. No need to.)

DSlomer64

Posted 2016-02-06T02:59:00.853

Reputation: 111