/tmp directory in Linux Android SDK

前端 未结 15 2354
醉话见心
醉话见心 2020-12-28 15:00

Just to tinker with it, last night I installed the Android Studio/SDK, and both during install and use, it repeatedly blew my 2Gb /tmp partition. Is there any way to tell t

15条回答
  •  青春惊慌失措
    2020-12-28 15:53

    You can change the location of the temporary directory used by the Java Virtual Machine running Android Studio. In Android Studio 2.0 or later, select Help -> Edit Custom VM Options. This will create a copy of the installation's vmoptions file in your own configuration directory and open it in the editor. Add the following line and restart:

    -Djava.io.tmpdir=
    

    where is an absolute path to a directory in a partition with enough space. If doesn't exist, it will be created the next time Android Studio is started.

    You can also edit the file directly (and need to in versions prior to 2.0), but it's location varies depending on the platform version and possibly an environment variable setting. See Configuring Android Studio: IDE & VM Options, JDK, etc. for the details.

    An alternative solution would be to increase the size of /tmp which in your case is most likely a tmpfs partition and thus easily resizable.

提交回复
热议问题