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 this monster to use something other than /tmp, especially for downloading/unzipping?
Fedora release 20 (Heisenbug)
Thanks
The /tmp directory is a temporary landing place for files. Users also have write access to this directory, which can be a bad thing, but there is a solution.
Linux: ~/Android/Sdk. Mac: ~/Library/Android/sdk. Windows: %LOCALAPPDATA%\Android\sdk.
Web servers have a directory named /tmp used to store temporary files. Many programs use this /tmp directory for writing temporary data and generally remove the data when it is no longer needed. Otherwise the /tmp directory is cleared when the server restarts.
Setting -Djava.io.tmpdir=whatever
didn't work for me. I simply created $HOME/tmp/PackageOperation04
and then created a symlink from /tmp
.
cd ~ mkdir -p tmp/PackageOperation04 cd /tmp ln -s $HOME/tmp/PackageOperation04
This way the Android SDK uses my /home
partition instead of /tmp
for this.
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=<directory>
where <directory>
is an absolute path to a directory in a partition with enough space. If <directory>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With