任务':app:packageAllReleaseClassesForMultiDex'执行失败

时间:2015-03-24 13:55:27

标签: android android-studio

从Android Studio 1.1.0生成APK时出现此错误

我添加了以下jar文件:

  • android-support-multidex.jar aspectjrt-1.7.3.jar and fmmr.jar
  • google-api-client-1.19.1.jar google-api-client-android-1.19.1.jar
  • 谷歌-API的客户端 - GSON-1.19.1.jar
  • 谷歌-API服务-的YouTube-V3-rev120-1.19.0.jar
  • google-collections-1.0.jar google-http-client-1.19.0.jar
  • 谷歌-HTTP-客户机器人-1.19.0.jar
  • google-http-client-jackson2-1.19.0.jar google-oauth-client-1.19.0.jar
  • hamcrest-core-1.3.jar ion-2.0.5.jar isoparser-1.0-RC-27.jar
  • jackson-core-2.1.3.jar jsr305-1.3.9.jar junit-4.12.jar
  • robolectric-2.4-jar-with-dependencies.jar twitter4j-core-4.0.2.jar
  • YouTubeAndroidPlayerApi.jar

和我的build.gradle文件:

申请插件:' com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"
    signingConfigs {
        release {
            storeFile file("cert1.jks") //check that the file exists
            storePassword "fts123"
            keyAlias "fts"
            keyPassword "fts123"
        }
    }
    defaultConfig {
        applicationId "com.test.app"
        minSdkVersion 14
        targetSdkVersion 21
        multiDexEnabled true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }

    }
}

dependencies {
    compile project(':volley')
    compile project(':facebookSDK')
    compile project(':comtwittersdkandroid_twitter')
    //compile 'com.android.support:support-v4:22.0.0'
    compile 'com.android.support:appcompat-v7:22.0.0'
    //compile 'com.google.android.gms:play-services:7.0.0'
    compile 'com.google.android.gms:play-services-plus:7.0.0'
    compile 'com.google.android.gms:play-services-identity:7.0.0'
    compile files('libs/android-support-multidex.jar')
    compile files('libs/aspectjrt-1.7.3.jar')
    compile files('libs/fmmr.jar')

    compile files('libs/google-api-client-1.19.1.jar')
    compile files('libs/google-api-client-android-1.19.1.jar')
    //compile files('libs/google-api-client-gson-1.19.1.jar')
    compile files('libs/google-api-services-youtube-v3-rev120-1.19.0.jar')
    compile files('libs/google-collections-1.0.jar')
    compile files('libs/YouTubeAndroidPlayerApi.jar')
    compile 'com.google.http-client:google-http-client-gson:1.19.0'
    compile files('libs/google-http-client-1.19.0.jar')
    compile files('libs/google-http-client-android-1.19.0.jar')
    compile files('libs/google-http-client-jackson2-1.19.0.jar')
    compile files('libs/google-oauth-client-1.19.0.jar')
    compile files('libs/hamcrest-core-1.3.jar')
    compile files('libs/ion-2.0.5.jar')
    compile files('libs/jackson-core-2.1.3.jar')
    compile files('libs/jsr305-1.3.9.jar')

    compile files('libs/isoparser-1.0-RC-27.jar')
    compile files('libs/junit-4.12.jar')
    //compile files('libs/robolectric-2.4-jar-with-dependencies.jar')
    compile files('libs/twitter4j-core-4.0.2.jar')
}

如果我将minifyEnabledfalse更改为true,我会收到另一个错误:

  

任务执行失败':app:proguardRelease'。

0 个答案:

没有答案