Android Studio: Change the Cache Location (AndroidStudioBeta)
1 min read

Android Studio: Change the Cache Location (AndroidStudioBeta)

Android Studio: Change the Cache Location (AndroidStudioBeta)

Android Studio (AS) creates a directory .AndroidStudioBeta (which will likely be .AndroidStudio once it's launched officially). This happens for each user and looks like a cache directory, where local bits are stored. Unfortunately, the size of mine (after only a couple of projects) is of about 350Mb (1200+ files, almost 200 dirs) and this gets taxed since my home dire gets synced at login/logout with a networked drive.

Following the steps described in the "universal" solution, I ended up with:

  1. Locate the place where you've installed you AS (e.g. C:\Program Files\Android Studio)

  2. Go to the bin directory and edit idea.properties file

  3. Search for idea.config.path and idea.system.path and edit those. I ended up having something like:

    #---------------------------------------------------------------------
    #
    idea.config.path=${user.home}/no-backup/.AndroidStudioBeta/config
    
    idea.system.path=${user.home}/no-backup/.AndroidStudioBeta/system
    #
    #---------------------------------------------------------------------
    

    Make sure to uncomment the lines, otherwise you'll end up with AS recreating the directory in your home.

  4. It's advisable to keep ${user.home} as directory, because AS will create (or update) the directory for each user!

Note that according to this, you need to copy the file into your home directory if you're on a mac :(

That's it.

HTH,