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

前端 未结 9 1409
眼角桃花
眼角桃花 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:12

    There is the way to safely removed system-image

    Go in SDK Manager in toolbar :

    Go in Android SDK :

    In tab SDK Platforms, uncheck which platform you want unistall :

    Click ok and confirm deletion :

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

    System images are pre-installed Android operating systems, and are only used by emulators. If you use your real Android device for debugging, you no longer need them, so you can remove them all.

    The cleanest way to remove them is using SDK Manager. Open up SDK Manager and uncheck those system images and then apply.

    Also feel free to remove other components (e.g. old SDK levels) that are of no use.

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

    By deleting all emulator, sometime memory will not be reduce to our expectation. So open below mention path in you c drive

    C:\Users{Username}.android\avd

    In this avd folder, you can able to see all the avd's which you created earlier. So you need to delete all avd's that will remove all the unused spaces grab by your emulator's. Than create the fresh emulator for you works.

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

    You do not need to keep the system images unless you want to use the emulator on your desktop. Along with it you can remove other unwanted stuff to clear disk space.

    Adding as an answer to my own question as I've had to narrate this to people in my team more than a few times. Hence this answer as a reference to share with other curious ones.

    In the last few weeks there were several colleagues who asked me how to safely get rid of the unwanted stuff to release disk space (most of them were beginners). I redirected them to this question but they came back to me for steps. So for android beginners here is a step by step guide to safely remove unwanted stuff.

    Note

    • Do not blindly delete everything directly from disk that you "think" is not required occupying. I did that once and had to re-download.
    • Make sure you have a list of all active projects with the kind of emulators (if any) and API Levels and Build tools required for those to continue working/compiling properly.

    First, be sure you are not going to use emulators and will always do you development on a physical device. In case you are going to need emulators, note down the API Levels and type of emulators you'll need. Do not remove those. For the rest follow the below steps:

    Steps to safely clear up unwanted stuff from Android SDK folder on the disk

    1. Open the Stand Alone Android SDK Manager. To open do one of the following:
    • Click the SDK Manager button on toolbar in android studio or eclipse
    • In Android Studio, go to settings and search "Android SDK". Click Android SDK -> "Open Standalone SDK Manager"
    • In Eclipse, open the "Window" menu and select "Android SDK Manager"
    • Navigate to the location of the android-sdk directory on your computer and run "SDK Manager.exe"

    .

    1. Uncheck all items ending with "System Image". Each API Level will have more than a few. In case you need some and have figured the list already leave them checked to avoid losing them and having to re-download.

    .

    1. Optional (may help save a marginally more amount of disk space): To free up some more space, you can also entirely uncheck unrequired API levels. Be careful again to avoid re-downloading something you are actually using in other projects.

    .

    1. In the end make sure you have at least the following (check image below) for the remaining API levels to be able to seamlessly work with your physical device.

    In the end the clean android sdk installed components should look something like this in the SDK manager.

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

    This is the minimal stuff I keep for day to day Android development (including production code). Latest versions from API 25 to API 27 (Nougat to Android P) included only, and you can work great with it.

    • To minimize even more, just keep any one of the below versions as same and keep a lower versions i.e. API 16 with same files downloaded as below.

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

    In this folder there are all emulator images. If you don't use emulator then you can delete this folder.

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