Android SDK folder taking a lot of disk space. Do we need to keep all of the System Images?

前端 未结 9 1410
眼角桃花
眼角桃花 2020-12-12 08:32

There are a lot of system images piling up on my disk in the android sdk folder. i hardly use the emulator. May be once in 6 months. Most of my development

相关标签:
9条回答
  • 2020-12-12 09:38

    In addition to the other answers, the following directory contains deletable system images on a Mac for Android Studio 2.3.3. I was able to delete the android-16 and android-17 directories without any problem because I didn't have any emulators which used them. (I kept the android-24 which was in use.)

    $ pwd
    /Users/gareth/Library/Android/sdk/system-images
    
    $ du -h
    2.5G    ./android-16/default/x86
    2.5G    ./android-16/default
    2.5G    ./android-16/google_apis/x86
    2.5G    ./android-16/google_apis
    5.1G    ./android-16
    2.5G    ./android-17/default/x86
    2.5G    ./android-17/default
    2.5G    ./android-17
    3.0G    ./android-24/default/x86_64
    3.0G    ./android-24/default
    3.0G    ./android-24
     11G    .
    
    0 讨论(0)
  • 2020-12-12 09:39

    I had 20.8 GB in the C:\Users\ggo\AppData\Local\Android\Sdk\system-images folder (6 android images: - android-10 - android-15 - android-21 - android-23 - android-25 - android-26 ).

    I have compressed the C:\Users\ggo\AppData\Local\Android\Sdk\system-images folder.

    Now it takes only 4.65 GB.

    I did not encountered any problem up to now...

    Compression seems to vary from 2/3 to 6, sometimes much more:

    0 讨论(0)
  • 2020-12-12 09:39

    I recommend two steps to address the bloated SDK problem.

    First, I removed all but two versions of Android:

    1. The current version, e.g. 6.0 Marshmallow as of this writing. This version is to test and develop to the latest and greatest that the current Nexus handsets are running plus a couple of other brands.

    2. An older version, e.g. 4.04 Ice Cream Sandwich. This is to provide compatibility for the vast majority of handsets. You lose some functionality of the newer versions, but you gain a lowest common denominator of compatibility.

    Second, I removed the emulators, and kept only the above two. I told it not to store the complete system state to disk, which it does indeed warn you will take up a lot of space, though it does make start-up faster. Just start up the emulator before you go make your coffee in the morning :)

    If that's too much space, remove the emulators completely. Pick up a couple of older handsets off Ebay that will provide you with all the test platforms you need. They don't even have to be completely functional -- many apps don't need a SIM and cellular connectivity, for example.

    My Android environment was taking up 32 gigs on my 128-gig Macbook Air. Couldn't keep doing this. Some day they'll make terabyte Macbook Airs but until then, got to slim down.

    0 讨论(0)
提交回复
热议问题