com.android.build.transform.api.TransformException 与 android google play 服务 [英] com.android.build.transform.api.TransformException with android google play services

查看:25
本文介绍了com.android.build.transform.api.TransformException 与 android google play 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 Google Plus 集成到我的应用程序中,但它显示以下错误.下面是异常和gradle

I'm trying to integrate Google Plus in my application, and it showing following error. below are exception and gradle

错误:任务:app:transformClassesWithDexForDebug"的执行失败.

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' 以非零退出值 1 结束

com.android.build.transform.api.TransformException: 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 1

app build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "xxx.com.xxxx"
        multiDexEnabled true
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

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

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    //depend-materialcalendar
    compile 'com.prolificinteractive:material-calendarview:0.8.1'
    compile 'com.android.support:gridlayout-v7:23.0.1'
    compile 'com.android.support:cardview-v7:23.0.1'
    compile 'com.melnykov:floatingactionbutton:1.3.0'
    //depend-cometchat
    compile 'com.yalantis:contextmenu:1.0.4'
    compile 'com.google.code.gson:gson:2.3'
    compile files('libs/appcompat_v7.jar')
    compile files('libs/cometchat-sdk.jar')
    compile files('libs/jsoup-1.7.3.jar')
    compile files('libs/picasso-2.5.2.jar')
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'com.google.android.gms:play-services-base:8.1.0'
    compile 'com.google.android.gms:play-services-maps:8.1.0'
    compile files('libs/volley.jar')
    compile files('libs/PayPalAndroidSDK.jar')
    compile files('libs/gcm.jar')
    compile 'com.soundcloud.android:android-crop:1.0.1@aar'
    compile 'com.facebook.android:facebook-android-sdk:4.6.0'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.google.android.gms:play-services-plus:8.1.0'
    compile 'com.google.android.gms:play-services-identity:8.1.0'

}

project build.gradle

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
        classpath 'com.google.gms:google-services:1.4.0-beta3'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

推荐答案

  1. 尝试清理您的项目,然后重新构建.

  1. Try cleaning your project and then re-building.

尝试在您的应用 build.gradle 文件中添加 multiDexEnabled true.

Try adding multiDexEnabled true in your app build.gradle file.

defaultConfig {
    multiDexEnabled true
}

这篇关于com.android.build.transform.api.TransformException 与 android google play 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆