Android studio:app:DexDebug错误

时间:2015-11-27 02:14:52

标签: android github gradle dependencies

我想将this library添加到我的项目中,但是当我向build.gradle文件添加依赖项时,出现此错误:

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2

相关性:

compile ('com.github.florent37:materialviewpager:1.1.3@aar'){
        transitive = true
    }

我的应用build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '22.0.1'
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "ua.nau.edu.NAU_Guide"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    maven { url "https://jitpack.io" }
    mavenCentral()
    jcenter()
}

dependencies {
    compile project (':vksdk_library')
    compile project (':MaterialDesign')
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.mikepenz:google-material-typeface:1.2.0.1@aar'
    compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
    compile "com.android.support:appcompat-v7:23.1.0"
    compile 'com.android.support:recyclerview-v7:23.1.0'
    compile 'com.android.support:cardview-v7:23.1.0'
    compile 'com.android.support:support-annotations:23.1.0'
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile 'com.sothree.slidinguppanel:library:3.1.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.github.clans:fab:1.6.1'

    compile('com.github.afollestad.material-dialogs:core:0.8.5.0@aar') {
        transitive = true
    }

    compile ('com.github.ozodrukh:CircularReveal:1.1.1@aar') {
        transitive = true;
    }

    compile('com.mikepenz:materialdrawer:4.3.0@aar') {
        transitive = true
    }

    compile ('com.github.florent37:materialviewpager:1.1.3@aar'){
        transitive = true
    }
}

1 个答案:

答案 0 :(得分:0)

转到app / build.gradle并添加:

android {
   .....

       dexOptions {
        javaMaxHeapSize "4g"
    }
}