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: 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}
 
 Android Studio Version
 Preferences Folder Name
 1.0.x and 1.1.x  AndroidStudio
 1.2.0 EAP/Preview  AndroidStudioPreview1.2
 1.2.0, 1.2.1, 1.2.2  AndroidStudio1.2
 1.3 Preview  AndroidStudioPreview1.3
 1.3.0, 1.3.1, 1.3.2  AndroidStudio1.3
 1.4.0 EAP/Preview (Future)  AndroidStudioPreview1.4
 
Windows:
  • %USERPROFILE%\.{FOLDER_NAME}\studio.exe.vmoptions and/or %USERPROFILE%\.{FOLDER_NAME}\studio64.exe.vmoptions
  • %USERPROFILE%\.{FOLDER_NAME}\idea.properties
Mac:
  • ~/Library/Preferences/{FOLDER_NAME}/studio.vmoptions
  • ~/Library/Preferences/{FOLDER_NAME}/idea.properties
Linux:
  • ~/.{FOLDER_NAME}/studio.vmoptions and/or ~/.{FOLDER_NAME}/studio64.vmoptions
  • ~/.{FOLDER_NAME}/idea.properties
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 Java 7 on OSX (which normally picks Java 6 from the version specified in Info.plist):
$ export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk
$ 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

-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-XX:+UseCompressedOops

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:
 
 
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.plugins.path=${idea.config.path}/plugins
 
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500
 
#---------------------------------------------------------------------
# This option controls console cyclic buffer: keeps the console output size not higher than the specified buffer size (Kb).
# Older lines are deleted. In order to disable cycle buffer use idea.cycle.buffer.size=disabled
#---------------------------------------------------------------------
idea.cycle.buffer.size=1024
 
#---------------------------------------------------------------------
# Configure if a special launcher should be used when running processes from within IDE.
# Using Launcher enables "soft exit" and "thread dump" features
#---------------------------------------------------------------------
idea.no.launcher=false
 
#---------------------------------------------------------------------
# To avoid too long classpath
#---------------------------------------------------------------------
idea.dynamic.classpath=false
 
#---------------------------------------------------------------------
# There are two possible values of idea.popup.weight property: "heavy" and "medium".
# If you have WM configured as "Focus follows mouse with Auto Raise" then you have to
# set this property to "medium". It prevents problems with popup menus on some
# configurations.
#---------------------------------------------------------------------
idea.popup.weight=heavy
 
#---------------------------------------------------------------------
# Use default anti-aliasing in system, i.e. override value of "Settings|Editor|Appearance|Use anti-aliased font"
# option. May be useful when using Windows Remote Desktop Connection for instance.
#---------------------------------------------------------------------
idea.use.default.antialiasing.in.editor=false
 
#---------------------------------------------------------------------
# Disabling this property may lead to visual glitches like blinking and fail to repaint
# on certain display adapter cards.
#---------------------------------------------------------------------
sun.java2d.noddraw=true
 
#---------------------------------------------------------------------
# Removing this property may lead to editor performance degradation under Windows.
#---------------------------------------------------------------------
sun.java2d.d3d=false
 
#---------------------------------------------------------------------
# Workaround for slow scrolling in JDK6
#---------------------------------------------------------------------
swing.bufferPerWindow=false
 
#---------------------------------------------------------------------
# Removing this property may lead to editor performance degradation under X Window.
#---------------------------------------------------------------------
sun.java2d.pmoffscreen=false
 
#---------------------------------------------------------------------
# Workaround to avoid long hangs while accessing clipboard under Mac OS X.
#---------------------------------------------------------------------
#ide.mac.useNativeClipboard=True
 
#---------------------------------------------------------------------
# Maximum size (kilobytes) IDEA will load for showing past file contents -
# in Show Diff or when calculating Digest Diff
#---------------------------------------------------------------------
#idea.max.vcs.loaded.size.kb=20480
 
#---------------------------------------------------------------------
# High Density (aka Retina aka HiDPI) Display support:
#
# The two options below allow overriding the built-in HiDPI display detection
# algorithm to provide a custom system DPI.
# The options are not supported on Mac, as Retina support is built-in.
#
# hidpi.system.dpi.override=<dpi_value>
# where <dpi_value> can range from 96 (100% zoom), to 288 (300%) zoom. 
#
# hidpi=true is a legacy option that is equivalent to setting
hidpi.system.dpi.override=192 (200% zoom)
#---------------------------------------------------------------------
#hidpi.system.dpi.override=192
#hidpi=true
 
 
Subpages (1): Mac OSX JDK Selection
 
http://tools.android.com/tech-docs/configuration
 
 
 
 
 

[转] - Configuring Android Studio: IDE & VM Options, JDK, etc的更多相关文章

  1. Android GreenDao with Android Studio IDE

    转:http://blog.surecase.eu/using-greendao-with-android-studio-ide/ In this tutorial we will show you ...

  2. Android Studio IDE 插件开发

    作者:字节跳动终端技术--周宸韬 概述 这篇文章旨在向读者介绍IntelliJ IDE插件的开发流程以及常用的一些通用功能,任何基于IntelliJ开发的IDE都可以通过该方式制作插件,例如Andro ...

  3. Android Studio IDE 简单学习和介绍

    @import url(http://i.cnblogs.com/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/c ...

  4. Android Studio IDE Out of Memory

    场景: 尝试过各种方式,IDE重装,重新启动,设置IDE MEMORY大小JDK MEMORY大小都无效 终于在FILE->INVALIDATE CACHES/RESTART 中点击重新启动之后 ...

  5. android studio IDE 下,设置ACTIVITY全屏

    因为ANDROID STUDIO的JAVA类是继承AppCompatActivity的 ,所以常规的全屏设置并不管用.如果要设置全屏,请参照如下代码/ 1/首先,打开AndroidManifest.x ...

  6. Android Studio IDE 所遇问题汇总

    [窗体视图无法显示]     在/res/values/styles.xml文件中,修改一下内容 <!-- Base application theme. --><style nam ...

  7. Android Studio IDE 主题设置

    1.界面主题设置,如下图: 2.代码字体设置,如下图:

  8. Android Studio IDE的 LogCat如何过滤指定应用的调试信息

    http://blog.csdn.net/wangqing830414/article/details/40377979 打开 LogCat在搜索框右侧的No Filters中选择 Edit Filt ...

  9. Android Studio 关联 JDK Java 源码

    Android Studio 关联 Android 源码比较方便,一般下载后可自动关联,但是 Android Studio 默认使用的 JDK 是内嵌的,是不带源码的.所以在查看 JDK 源码时,看到 ...

随机推荐

  1. GZIP压缩优化

    使用gzip优化web应用(filter实现) 相关知识: gzip是http协议中使用的一种加密算法,客户端向web服务器端发出了请求后,通常情况下服务器端会将页面文件和其他资源,返回到客户端,客户 ...

  2. 用于 Linux 平台的 Java

    切换到所需的安装目录.键入:cd directory_path_name例如,要将软件安装到 /usr/java/ 目录中,请键入:cd /usr/java/ 将 .tar.gz 档案二进制文件移到当 ...

  3. PHP设计模式之:单例模式

        前 些日子开始着真正的去了解下设计模式,开始么,简单地从单例模式开始,当然网上看了一些资料,单例模式比较好理解,看看介绍,然后看看代码基本也就能够理 解了,设计模式这些的花点心思基本的是能够理 ...

  4. AS3中 Event 类的target和currentTarget属性

    在事件处理过程中,会自动生成事件类的实例,并传给侦听器函数.通过这个参数就可以使用事件类的属性和方法.其中target与currentTarget属性是两个很相似的属性. 对于简单的事件处理过程,分清 ...

  5. 最新一代文件结构 超高性能解析IP数据库 qqzeng-ip.dat

    高性能IP数据库格式 qqzeng-ip.dat 编码:UTF8           字节序:Little-Endian 返回多个字段信息(如:亚洲|中国|香港|九龙|油尖旺|新世界电讯|810200 ...

  6. django静态文件配置

    开发环境配置 需要下面几个步骤 1. 在app目录下创建static目录,将静态文件和相关文件夹放到此目录下,如your_app/static/img等 2. 确保settings.py中的INSTA ...

  7. 10 个实用技巧,让 Finder 带你飞

    Finder 是 Mac 电脑的系统程序,有的功能类似 Windows 的资源管理器.它是我们打开 Mac 首先见到的「笑脸」,有了它,我们可以组织和使用 Mac 里的几乎所有东西,包括应用程序.文件 ...

  8. Codeforces 747D:Winter Is Coming(贪心)

    http://codeforces.com/problemset/problem/747/D 题意:有n天,k次使用冬天轮胎的机会,无限次使用夏天轮胎的机会,如果t<=0必须使用冬轮,其他随意. ...

  9. JSON总结

    JSON:  关于JSON,最重要的是要理解它是一种数据格式,不是一种编程语言.虽然JSON与JavaScript具有相同的语法形式与JSON具有相同的语法形式,但JSON并不从属于JavaScrip ...

  10. c#DataGridView数据绑定示例——格式化单元格的内容(转)

    转自http://blog.csdn.net/testcs_dn/article/details/37834063 c#DataGridView数据绑定示例 格式化单元格的内容 在使用DataGrid ...