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

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

问题描述

我试图将Google Plus集成到我的应用程序中,并显示以下错误。错误:执行失败,任务':app:transformClassesWithDexForDebug'。


com.android.build.transform.api.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\程序文件\\ Java \jdk1.7.0_79 \\\\\\\\\\\\'''''以非零退出值1结束

app build.gradle

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

android {
compileSdkVersion 23
buildToolsVersion23.0.1

defaultConfig {
applicationIdxxx.com.xxxx
multiDexEnabled true
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName1.0
}

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

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

}

project build.gradle $ b

  buildscript {
存储库{
jcenter()
}
依赖关系{
classpath'com.android.tools.build:gradle:1.3.0'
classpath'com.goog le.gms:google-services:1.4.0-beta3'
//注意:不要在这里放置应用程序依赖关系;它们属于单个模块build.gradle文件中的
//
}
}

allprojects {
存储库{
jcenter()



$ div $ b $ div class =h2_lin>解决方案


  1. 尝试添加 multiDexEnabled 尝试清理项目然后重新构建。 c> true在您的应用程序中 build.gradle 文件。

      defaultConfig { 
    multiDexEnabled true
    }



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

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'' 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. Try cleaning your project and then re-building.

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

    defaultConfig {
        multiDexEnabled true
    }
    

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

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