Android Studio Gradle OutofMemory 错误 [英] Android Studio Gradle OutofMemory Error

查看:47
本文介绍了Android Studio Gradle OutofMemory 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我得到的每个 gradle 构建之后,我一直试图将我的 android 项目导入到带有 Android Studio 0.5.2 的新计算机中:

Ive been trying to import my android project into a new computer with Android Studio 0.5.2 after each gradle build i get:

Out of memory: Java heap space. Configure Gradle memory settings using '-Xmx' JVM option (e.g. '-Xmx2048m'.)
    Please fix the project's Gradle settings.
    Gradle settings

项目不是很大,我唯一使用的是谷歌播放服务,我不认为它需要大量内存.为此,我很头疼,我不知道该怎么办.

The project isnt very big,only thing im using is google play services and i dont believe it requires alot of memory.For this has a head scratcher and i dont know what to do.

推荐答案

尝试以下操作:

Try the following:

Ctrl + Alt + S -> 编译器 -> Gradle

Ctrl + Alt + S -> Compiler -> Gradle

VM Options 字段中写入:

-Xmx2048m -XX:MaxPermSize=512m

-Xmx2048m -XX:MaxPermSize=512m

这篇关于Android Studio Gradle OutofMemory 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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