I am having problem with gradle after updating my project to com.android.tools.build:gradle:3.0.1. It was previously working with com.android.tools.build:gradle:2.1.3. I have already tweak my memory setting which is located in gradle.properties.
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx5120m -XX:MaxPermSize=3230m-XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
But still getting the following error
> The system is out of resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError: GC overhead limit exceeded
> at com.sun.tools.javac.util.IntHashTable.rehash(IntHashTable.java:175)
> at com.sun.tools.javac.util.IntHashTable.putAtIndex(IntHashTable.java:146)
> at com.sun.tools.javac.parser.JavacParser$SimpleEndPosTable.storeEnd(JavacParser.java:4122)
> at com.sun.tools.javac.parser.JavacParser$SimpleEndPosTable.toP(JavacParser.java:4132)
> at com.sun.tools.javac.parser.JavacParser.toP(JavacParser.java:557)
> at com.sun.tools.javac.parser.JavacParser.term3(JavacParser.java:1252)
> at com.sun.tools.javac.parser.JavacParser.term2(JavacParser.java:909)
> at com.sun.tools.javac.parser.JavacParser.term1(JavacParser.java:880)
> at com.sun.tools.javac.parser.JavacParser.term(JavacParser.java:836)
> at com.sun.tools.javac.parser.JavacParser.term(JavacParser.java:816)
> at com.sun.tools.javac.parser.JavacParser.unannotatedType(JavacParser.java:810)
> at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBodyDeclaration(JavacParser.java:3518)
> at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBody(JavacParser.java:3436)
> at com.sun.tools.javac.parser.JavacParser.classDeclaration(JavacParser.java:3285)
> at com.sun.tools.javac.parser.JavacParser.classOrInterfaceOrEnumDeclaration(JavacParser.java:3226)
> at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBodyDeclaration(JavacParser.java:3486)
> at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBody(JavacParser.java:3436)
> at com.sun.tools.javac.parser.JavacParser.classDeclaration(JavacParser.java:3285)
> at com.sun.tools.javac.parser.JavacParser.classOrInterfaceOrEnumDeclaration(JavacParser.java:3226)
> at com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3215)
> at com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3155)
> at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:628)
> at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
> at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
> at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.<init>(JavacProcessingEnvironment.java:892)
> at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.next(JavacProcessingEnvironment.java:921)
> at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1187)
> at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
> at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
> at com.sun.tools.javac.main.Main.compile(Main.java:523)
> at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
> at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
>
> FAILED
> :app:buildInfoGeneratorSimDebug
you can try this.