0

Following is the code of app.gradle file. My individual project module works perfectly but while combines every module in single application I am getting this error. I have made this application for android smartphone only.

Which necessary library should include? I have read about this error and enabled multiDexEnabled and also imported com.android.support:multidex:1.0.1 but still getting this error.

apply plugin: 'com.android.application'

android 
{
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.example.mayankacharya.dementiahelpdesk"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}
repositories {
maven {
    url     'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
}
}

dependencies 
{
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'


compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.maps.android:android-maps-utils:0.4+'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'org.xwalk:xwalk_core_library:17.46.448.10'
compile 'com.android.support:multidex:1.0.1'
}

While Compiling Android Project I am getting this error.

java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException:
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command 'C:\Program
Files\Java\jdk1.7.0_25\bin\java.exe'' finished with non-zero exit value 3
halfer
  • 19,824
  • 17
  • 99
  • 186
Mayank Acharya
  • 81
  • 3
  • 11

1 Answers1

2

Try adding this to your build file.

dexOptions {
        javaMaxHeapSize "4g"
}
Claud
  • 1,065
  • 3
  • 26
  • 38