Android dependency Symja will not load in gradle

350 views Asked by At

I'm using a symja android library and log4 in my android application. But for some reason every time I run the project I gets stuck on app:preDexDebug for about 20 minutes and then gives the error:

* 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.

In gradle build messages I'm getting :

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":[{}]}

I know it has something to do with the symja library and not the log4 as when I remove symja it works just fine.

I'm using symja-2015-09-26 & log4j-1.2.11 from https://bitbucket.org/axelclk/symja_android_library/downloads

Please help!!

1

There are 1 answers

0
manvgom On

I added this in gradle.build:

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

Now it works fine.