Android SDK takes a huge amount of disk space

*爱你&永不变心* 提交于 2019-12-11 06:49:32

问题


I did many searches on the web, and only partially I understood what I have to do.

When my IDE (Android Studio) reminded me that are available recent update for android SDK, I provided to install them. Now I notice that the Android-SDK directory occupies 87Gb of HDD memory. This because are installed all the Android API from older version to the latest new.

Today I decided to delete all the SDK directory and perform a clean installaton of the SDK tool. What I ask is which are the minimum things that I've to install from the SDK manager to be up and running for Android Development. Consider that my apps must run from Android API 14 (4.0 IceCream) to the least available API version (currently on October 2017 is API 25). In addiction I use an Android Emulator with Lollipop 5.1 (API 22).

The last thing I ask is when there is a new available and I would to install it, should I unistall all the older API version to prevent SDK grow up?

This is the screenshot of my Android Studio SKD manager. As you can see the only checked API is 7.1.1 Nougat API 25.

This is a series of screenshot of package details of SDK Manager

The others are all unchecked. I have to say that for Android 5.1 Lollipop API 22, check marks appear after I create the Android Emulator with Lollipop Installed.

NB: I need only things for mobile programming, not TV or Wearable.


回答1:


should I unistall all the older API version to prevent SDK grow up?

Yes you can do this to reduce the space size taken by the SDK

Cons : you will not be able to use instant run if you are running your app on particular device on lollipop and above.

Note : you can drop old version under API 14 as support library has also dropped the support for older version

From docs, Revision 26.0.0 Release (July 2017)

The minimum SDK version has been increased to 14. As a result, many APIs that existed only for compatibility with pre-14 API levels have been deprecated. Clients of these APIs should migrate to their framework equivalents as noted in the reference page for each deprecated API.



来源:https://stackoverflow.com/questions/46668081/android-sdk-takes-a-huge-amount-of-disk-space

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!