为什么Android Studio会使用如此多的RAM内存? [英] Why Android Studio uses so much RAM memory?

查看:274
本文介绍了为什么Android Studio会使用如此多的RAM内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。

我刚刚安装了Android Studio。但是这个IDE有问题。

当Android Studio运行时,它会占用大量的RAM内存。我正在运行此IDE的机器有4GB RAM内存。在运行Android Studio之前,RAM的使用率是40%,但在运行此IDE之后,RAM内存使用率达到了85%!!!

那么我该怎么办才能使用比这更少的内存?这个内存使用量会导致机器运行缓慢,有时会停止工作。



谢谢。

Hi there.
I've just installed Android Studio. But I have a problem with this IDE.
When the Android Studio is running, it uses a lot of RAM memory. The machine I'm running this IDE on that, have a 4GB RAM memory. Before running Android Studio, the RAM usage is on 40%, but after running this IDE the RAM memory usage goes on 85% !!!
So what can I do to use memory fewer than this? This amount of memory usage causes the machine to run so slow and sometimes to stop working.

Thanks.

推荐答案

你无法改善这一点。我也在使用Android Studio,它同样使用RAM。这就是为什么我不喜欢谷歌的软件; Picasa,Chrome等。它们都不是内存效率高的软件。我更喜欢微软的Visual Studio [ ^ ]或 Eclipse [ ^ ]或 NetBeans [ ^ ] IDE。他们都比Android Studio好; Visual Studio不支持本机Android开发。



只有一个解决方案,你应该使用Eclipse,它使用较少的RAM,并做同样的事情,提供一个IDE对于您的开发过程,还要注意在Android Studio之前,Eclipse被支持作为开发Android应用程序的IDE。 但它不再是正式的
You can do nothing to improve this. I am also using Android Studio, and it uses RAM similarly. That is why I don't prefer Google's software; Picasa, Chrome etc. They all are not memory efficient software. I prefer Microsoft's Visual Studio[^] or Eclipse[^] or NetBeans[^] IDE. They're all better than Android Studio; Visual Studio doesn't support native Android development.

There is only one solution, you should use Eclipse which uses less RAM, and does the same thing, provides an IDE for your development processes, also note that before Android studio, Eclipse was supported as the IDE for development of Android applications. But it is not official anymore.



我正在更改gradle属性文件,它对我有用;-)

在编辑器中打开'gradle.properties'文件并将其更改为:



原文:

Hi I'm change the gradle properties file and it's work for me ;-)
Open 'gradle.properties' file in editor and change it like this:

Original:
org.gradle.jvmargs=-Xmx1536m





更改为:



Change to:

org.gradle.jvmargs=-Xms512m -Xmx1024m





Xms是最小值,Xmx是最大值gradle可以使用它。

所以它的值取决于你的系统内存(RAM)。



我希望这个解决方案是为你工作。



The 'Xms' is minimum and 'Xmx' is maximum memory of the gradle can use it.
So the value of that is depend of your system memory (RAM).

I hope this solution is work for you.


这篇关于为什么Android Studio会使用如此多的RAM内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆