错误:任务':app:transformClassesWithDexForDebug'执行失败使用Google Pubsub客户端库时

时间:2016-10-11 11:43:44

标签: android android-studio google-cloud-platform google-cloud-pubsub

当我尝试运行应用程序时出现以下错误:

  

错误:任务&#39;:app:transformClassesWithDexForDebug&#39;执行失败。    com.android.build.api.transform.TransformException:java.lang.RuntimeException:java.lang.RuntimeException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:java.lang.UnsupportedOperationException < / p>

这是Build.gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"
    defaultConfig {
        applicationId "com.manzoor.myapplication"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {
        incremental true
        javaMaxHeapSize "4g"
        preDexLibraries = false
    }
    android.packagingOptions {
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/INDEX.LIST'
        exclude 'META-INF/io.netty.versions.properties'
        exclude 'com.google.protobuf.AbstractMessageLite'

    }
}

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

    compile group: 'com.google.cloud', name: 'google-cloud-pubsub', version: '0.4.0'
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:multidex:1.0.1'

}

0 个答案:

没有答案