0

My gradle.build file looks like this:

    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.2"

        defaultConfig {
            applicationId "com.example.alexandernohe.mapsappgoogle"
            minSdkVersion 16
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
            multiDexEnabled true
        }
        packagingOptions {
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/LICENSE-FIREBASE.txt'
            exclude 'META-INF/NOTICE'
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.2.1'
        compile 'com.google.android.gms:play-services:8.4.0'
        compile 'com.google.maps.android:android-maps-utils:0.4.3'
        compile 'com.firebase:firebase-client-android:2.5.1+'
        compile 'com.android.support:support-v4:23.2.1'
        compile 'com.android.support:design:23.2.1'

    }

I have enabled multidexing and have tried deleting the app/build folder but my application still will not build. If I remove the design library it will build but then I am unable to use a floating action button in my fragment, nor a coordinated layout. Most of the current solutions on here reference posts to enable multidexing, however, looking at the build file, you should see that it is enabled. I have a feeling that a library listed may overlap with the design library but as far as I can tell based upon googles documentation, they are different.

Here is the error code:

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 '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 3

EDIT: I forgot to mention, I have also performed a clean on the project as well.

Alexander N.
  • 1,458
  • 14
  • 25
  • Run gradle with --debug to get more details? – Doug Stevenson Mar 21 '16 at 01:35
  • I am just using the run app command via Android Studio? Are you suggesting go to the command line here? – Alexander N. Mar 21 '16 at 01:39
  • Yes, exactly. The command line gives you more options. A lot of times the error output suggests you run with extra flags to get more info. – Doug Stevenson Mar 21 '16 at 01:40
  • Debug did not provide me with anything I didn't already see. I think --stacktrace might provide me with more of what I am looking for. Trying that next. – Alexander N. Mar 21 '16 at 01:46
  • @DougStevenson looks like I hit a GC limit - http://pastebin.com/Fw4uUuQV I think this will solve it: http://stackoverflow.com/questions/33787030/android-studio-issue-in-build-gradle-uncaught-translation-error-executionexcep – Alexander N. Mar 21 '16 at 01:49

1 Answers1

2

Try this inside the android block of your build.gradle:

dexOptions {
    javaMaxHeapSize "4g"
}
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • i have include it in my gradle but still am unable to run my app module. even after cleaning, invalidating cache and rebuilding. my gradle looks as the one in this question together with the answer you provided. – Edijae Crusar Jun 03 '16 at 07:28