将 android-sdk 和 sdk 文件夹移动到另一个驱动器

我的窗口是在一个128GB 的 ssd 硬盘驱动器和它的运行空间。文件夹 C:\Users\User\AppData\Local\Android有2个文件夹 android-sdksdk文件夹,它们使用大约30GB 的空间。

是否可以将这些文件夹移动到外部硬盘驱动器?

如果可能的话,我应该在 android 工作室里做些什么改变?

66927 次浏览

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

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.

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