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
3
  • duplicate of link Commented Apr 18, 2016 at 18:35
  • Ohh okay...i don't know thanks anyway. Commented Apr 18, 2016 at 18:38
  • multi-dex means the 64k symbols limit reached. Commented Apr 18, 2016 at 22:25

1 Answer 1

2

Try adding this to your build file.

dexOptions {
        javaMaxHeapSize "4g"
}
Sign up to request clarification or add additional context in comments.

2 Comments

in the same file brother or in another gradle file?
In the same one, try adding it under buildTypes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.