Android Studio Gradle 问题:OutOfMemoryError:PermGen 空间 [英] Android Studio Gradle Issue: OutOfMemoryError: PermGen space
问题描述
经过几个小时的努力,从 Eclipse 导入一个旧项目以使用 Gradle 并导入到 Android Studio v0.1.3...我现在得到的是我实际上可以在命令行上进行构建,但是当我在 Studio 中构建/重建项目,我得到:
After several hours of fighting to get an older project imported from Eclipse to use Gradle and into Android Studio v0.1.3...what I've gotten to now is I can actually do the build on the command line, but when I do Build/Rebuild Project in Studio I get:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':EpicMix'.
> Failed to notify project evaluation listener.
> A problem occurred configuring project ':facebook'.
> Failed to notify project evaluation listener.
> java.lang.OutOfMemoryError: PermGen space
这不是一个巨大的项目,有几个小的子项目(包括 Facebook),所以我不认为它真的是内存.我就是想不通这是什么...
It's not a HUGE project, there's a few small sub-projects (including Facebook), so I don't think it really is memory. I just can't figure out what this is...
推荐答案
对于那些从命令行运行 gradle 的人,创建一个 gradle.properties 文件,把它放在你项目的根目录下, 并添加以下内容:
For those of you running gradle from the command line, create a gradle.properties file, put it in the root of your project, and add the following:
org.gradle.jvmargs=-XX:MaxPermSize=512m
这篇关于Android Studio Gradle 问题:OutOfMemoryError:PermGen 空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!