Android依赖项Symja不会在gradle中加载

时间:2016-03-03 03:05:30

标签: java android gradle dependencies symja

我在我的Android应用程序中使用symja android库和log4。但由于某些原因,每次我运行该项目时,我都会被app:preDexDebug卡住约20分钟,然后会出错:

* What went wrong:
Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_60\bin\java.exe'' finished with non-zero exit value 3

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --   debug option to get more log output.

在我得到的gradle构建消息中:

20:24:24.722 [ERROR] [org.gradle.api.Project] AGPBI:{"kind":"simple","text":"UNEXPECTED TOP-LEVEL ERROR:","sources":[{}]}
 AGPBI: {"kind":"simple","text":"java.lang.OutOfMemoryError: GC overhead limit exceeded","sources":[{}]}

我知道它与symja库有关,而不是log4,因为当我删除symja时它工作得很好。

我正在使用symja-2015-09-26&来自https://bitbucket.org/axelclk/symja_android_library/downloads

log4j-1.2.11

请帮助!!

1 个答案:

答案 0 :(得分:0)

我在gradle.build中添加了这个:

repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
    }
}
dexOptions {
    incremental true
    javaMaxHeapSize "4g"
}

现在工作正常。