This is because by default on Linux Mint (and Ubuntu) JVM stores all temporary files in /tmp/ which usually does not have a lot of space allocated (in my case has capacity of 2.5GB).
To fix this simply follow this guide (all credit Carlos Santos) or read on.
Keep in mind HOWEVER that if you are updating the SDKs this WILL NOT WORK as SDK Manager simply ignores VM options.
To fix Android Studio update.
1. First of all try restarting your PC as the TMP folder is cleared on every reboot, if that does not help continue.
2. Open Android Studio click "Window" > "Help" > "Edit Custom VM Options"
3. You will probably be asked to create ".vmoptions" document - click yes.
4. Enter this line in the document:
- -Djava.io.tmpdir=/PATH_TO_YOUR_CUSTOM_TMP_FOLDER
6. Open Android Studio and update normally
There are two ways to fix Android SDK Manager tmp/ location.
1. Create symlink like user3150128 suggests.
2. Add TEMP environment variable pointing to folder of your choice.
Both methods aren't nice - first because it creates symlink which could backfire in the future - e.g. if other software creates fodler with same name and not work at all if SDK Manager creates folder with different name. The second one is bad because it alters the way whole system works - adding environment variable for TEMP folder will make all programs start dumping their temp files in that location. Personally I like the second method as it is easier and quicker to revert.
To create symlink:
1. Create folder in location of choice e.g. "/home/YOUR_NAME/YOUR_TEMP"
2. Open terminal and invoke "cd /tmp/"
3. Create symlink by invoking "ln -s $HOME/tmp/PackageOperation04" - the "PackageOperation04" is the folder SDK Manager created on my system at the time but it may be different for you so check in your TMP folder.
To remove symlink
As described in this answer invoke "unlink $HOME/tmp/PackageOperation04"
To create environment variable for temporary folder
1. Open terminal and invoke "sudo gedit /etc/environment" this will open your environmental variables file.
2. Add line "TEMP=/YOUR_PATH_TO_TMP"
3. It may be necessary to restart Android Studio or your OS for the change to take effect.
To remove temp variable
Open environment file again, remove the line you previously entered, save and restart your PC.
Brak komentarzy:
Prześlij komentarz