Configuring Android Studio: IDE & VM Options, JDK, etc

You should not edit any files in the IDE installation directory. Instead, you can customize the attributes by creating your own .properties or .vmoptions files in the following directories. (This has been possible on some platforms before, but it required you to copy and change the entire contents of the files. With the latest changes these properties are now additive instead such that you can set just the attributes you care about, and the rest will use the defaults from the IDE installation).

Note: As of Android Studio 2.0, you can create/edit this file by accessing the "Edit Custom VM Options" file from the Help menu.

Note: The folder name depends on the version of Android Studio. The documentation below applies to the release version (1.1.x), but if you are on a different version of Android Studio, see the table below for the correct folder name for your version.

The following table shows the configuration folder name to use for each studio version. This folder is referenced below as {FOLDER_NAME}

You can also place use environment variables to point to specific override files elsewhere:

STUDIO_VM_OPTIONS, which vmoptions file to use

STUDIO_PROPERTIES, which property file to use

STUDIO_JDK, which JDK to run studio with

Note that this last variable allows you to, for example, run Android Studio with the latest JDK version on OSX (which might otherwise pick a lower version specified in Info.plist):

$ export STUDIO_JDK=/usr/libexec/java_home

$ open /Applications/Android\ Studio.app

(For Mac in particular, see this document on the topic of JDK selection.)

Increasing IDE Memory

By default, the IDE is assigned a maximum of 750 MB. If you have a large project, or if you have a lot of RAM on your system, the IDE will run better if you increase the amount of memory it is allowed to use. To do that, create your own studio.vmoptions override (in the location explained above) and add a line like this:

-Xmx2048m

The full set of default JVM arguments are the following, in case you want to override any of the others (such as the start heap size of the MaxPermSize) :defaults in the IDE right

Setting a Property

If you want to override an IDE property, create a new idea.properties file in your local config directory, where you specify just the override properties. This file will be merged with the default properties in the IDE. See the below list for various properties you can change.

For example, Android Studio 2.0 ships with experimental improved bidirectional text support (issue 182739). To enable this support, create a file named idea.properties with just this content:

editor.new.rendering=true

On a Mac, for Android Studio 2.0 Preview, copy this file to ~/Library/Preferences/AndroidStudioPreview2.0/idea.properties.

On Windows, the path would be %USERPROFILE%\.AndroidStudioPreview2.0\idea.properties

On Linux, the path would be ~/.AndroidStudioPreview2.0/idea.properties

Help, I Already Edited the IDE Installation Files

If you've already edited the files by hand, here are the files from 1.0 such that you can restore them:

Android Studio is Ignoring My idea.vmoptions File

Around 1.0 we switched from storing VM options in a file called idea.vmoptions to one called studio.vmoptions, to avoid clashing with IntelliJ installations. If you had created a file named idea.vmoptions for Studio, it will be ignored now. Put your edits in studio.vmoptions instead.

Properties

Here are properties you can customize in your own idea.properties file: