100

My windows is on a 128GB ssd hard drive and it's running out of space. the folder C:\Users\User\AppData\Local\Android has 2 folders android-sdk and sdk folders that use about 30GB of space.

Is it possible to move these folders to an external hard drive?

If it is possible, what changes should I make in the android studio?

3
  • 3
    Yep - Go into settings in android studio and you can select where you want the sdk to reside.
    – SQLiteNoob
    Jun 9, 2016 at 12:52
  • would it just move these folders too? Jun 9, 2016 at 12:52
  • 2
    Nah, you'd have to copy-paste them yourself. I have an ssd primary and an hdd secondary that i use.
    – SQLiteNoob
    Jun 9, 2016 at 12:53

3 Answers 3

122

I do the same thing. In Android Studio go to Settings, select Appearance and Behaviour then System Settings then Android SDK

You can choose the SDK location at the top.

You'll need to copy/paste the files to that location to save yourself the downloading time.

13
  • should I copy both sdk and android-sdk folders? Jun 9, 2016 at 12:55
  • 2
    It's normally Users\User\AppData\Local\Android\Sdk Copy that whole file into a new file you call ...\Sdk and use that
    – SQLiteNoob
    Jun 9, 2016 at 12:56
  • what is the android-sdk folder because it uses 22GB of space Jun 9, 2016 at 12:57
  • I'm going to guess it's a legacy from the older versions - the sdk used to be in a file named android-sdk - now it's just in the Sdk folder. The actual droid versions are found in sdk/platforms/
    – SQLiteNoob
    Jun 9, 2016 at 12:59
  • 5
    This works exactly the same way on Mac too! Thank you so much :) Oct 29, 2017 at 8:50
7

Its very simple just copy the sdk to wherever you want and then change the sdk path in android studio. For that just open the local.properties file and set the path like this:

sdk.dir=your path here
2

To keep the most used simulator in SSD drive and the others used for testing in the slow drive i created Symbolic. They are NTFS objects that appear in a folder as a sub folder but can that point to another folder on another drive.

To create then, move to C:\Users\<user>\.android\avd and do this:

mklink /d W10.1_WXGA_Tablet_API_28.avd d:\androidSimulators\W10.1_WXGA_Tablet_API_28.avd

MDLink info here.

If using Linux based systems you can also do this with linked directories.

For windows 10 users, emulators are stored by default at here:

C:\Users\<user>\.android\avd
2
  • 1
    The question is about moving the Android SDK, not the AVDs. May 1, 2020 at 22:52
  • 5
    @ArtemRussakovskii, yes but the goal is to release space. AVDs are huge and come inside SDK folder
    – MiguelSlv
    May 2, 2020 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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