LoginSignup
8
8

More than 5 years have passed since last update.

Linux 環境下でAndroid Studioのメモリ設定を変更する

Posted at

Linux 環境下で、Android Studio の使用メモリの量を変更する方法

昔いじったファイルといつの間にかファイル名とかが変更されてたのでメモ(v0.8.12にて確認)

Android Studio の展開ディレクトリ以下の下記のファイルを編集する

android-studio/bin/studio.vmoptions
android-studio/bin/studio64.vmoptions

どっちをいじるかは環境次第で。

メモリを16GBを詰んだ64bit Ubuntuだと、これぐらいがちょうどよかった。

android-studio/bin/studio64.vmoptions
-Xms512m
-Xmx3000m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=1024m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:+HeapDumpOnOutOfMemoryError
-Dawt.useSystemAAFontSettings=lcd
-XX:+UseCompressedOops

8
8
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8