执行失败的任务“:应用程序:transformClassesWithDexForDebug”,而谷歌实现登录Android版 [英] Execution failed for task ':app:transformClassesWithDexForDebug' while implementing Google sign in for Android

查看:1913
本文介绍了执行失败的任务“:应用程序:transformClassesWithDexForDebug”,而谷歌实现登录Android版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现谷歌登录Android和我通过

I'm trying to implement Google sign in for Android and I'm following the instructoins via

<一个href=\"https://developers.google.com/identity/sign-in/android/start-integrating\">https://developers.google.com/identity/sign-in/android/start-integrating

不过,在构建应用我收到以下错误。

But while building the application I'm receiving the following error.

信息:摇篮任务[:应用:generateDebugSources,
  :应用:generateDebugAndroidTestSources,:应用程序:assembleDebug]
  :应用程序:preBuild UP-TO-DATE:应用程序:preDebugBuild UP-TO-DATE
  :应用:checkDebugManifest:应用程序:preReleaseBuild UP-TO-DATE
  :应用程序:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
  :应用程序:prepareComAndroidSupportDesign2301Library UP-TO-DATE
  :应用程序:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
  :应用程序:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE
  :应用程序:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library
  最新
  :应用程序:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library
  UP-TO-DATE:应用程序:prepareComGoogleAndroidGmsPlayServicesBase810Library
  最新
  :应用程序:prepareComGoogleAndroidGmsPlayServicesBasement810Library
  最新
  :应用程序:prepareComGoogleAndroidGmsPlayServicesIdentity810Library
  最新
  :应用程序:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library
  UP-TO-DATE:应用程序:prepareComGoogleAndroidGmsPlayServicesPlus810Library
  UP-TO-DATE:应用程序:prepareDebugDependencies:应用:compileDebugAidl
  UP-TO-DATE:应用:compileDebugRenderscript UP-TO-DATE
  :应用:generateDebugBuildConfig UP-TO-DATE:应用:generateDebugAssets
  UP-TO-DATE:应用:mergeDebugAssets UP-TO-DATE
  :应用:generateDebugResValues​​ UP-TO-DATE:应用:processDebugGoogleServices
  没有匹配的客户端发现包名com.questo.rugved.questo
  :应用:generateDebugResources:应用:mergeDebugResources UP-TO-DATE
  :应用:processDebugManifest UP-TO-DATE:应用:processDebugResources
  UP-TO-DATE:应用:generateDebugSources UP-TO-DATE
  :应用程序:preDebugAndroidTestBuild UP-TO-DATE
  :应用程序:prepareDebugAndroidTestDependencies
  :应用:compileDebugAndroidTestAidl UP-TO-DATE
  :应用:processDebugAndroidTestManifest UP-TO-DATE
  :应用:compileDebugAndroidTestRenderscript UP-TO-DATE
  :应用:generateDebugAndroidTestBuildConfig UP-TO-DATE
  :应用:generateDebugAndroidTestAssets UP-TO-DATE
  :应用:mergeDebugAndroidTestAssets UP-TO-DATE
  :应用:generateDebugAndroidTestResValues​​ UP-TO-DATE
  :应用:generateDebugAndroidTestResources UP-TO-DATE
  :应用:mergeDebugAndroidTestResources UP-TO-DATE
  :应用:processDebugAndroidTestResources UP-TO-DATE
  :应用:generateDebugAndroidTestSources UP-TO-DATE
  :应用:compileDebugJavaWithJavac UP-TO-DATE:应用:compileDebugNdk
  UP-TO-DATE:应用:compileDebugSources UP-TO-DATE
  :应用:transformClassesAndResourcesWithExtractJarsForDebug
  :应用:transformClassesWithDexForDebug意外顶级例外:
  错误:执行失败的任务
  ':应用程序:transformClassesWithDexForDebug。
  com.android.build.transform.api.TransformException:
  com.android.ide.common.process.ProcessException:
  org.gradle.process.internal.ExecException:进程命令
  / usr / lib目录/ JVM / Java的7甲骨文/斌/ java的'非零出口成品
  值2的信息:建立失效的信息:总时间:1分钟39.994
  秒资料:1的错误信息:0警告信息:查看
  在控制台完成输出

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE :app:prepareComAndroidSupportDesign2301Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesIdentity810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesPlus810Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:processDebugGoogleServices No matching client found for package name 'com.questo.rugved.questo' :app:generateDebugResources :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:preDebugAndroidTestBuild UP-TO-DATE :app:prepareDebugAndroidTestDependencies :app:compileDebugAndroidTestAidl UP-TO-DATE :app:processDebugAndroidTestManifest UP-TO-DATE :app:compileDebugAndroidTestRenderscript UP-TO-DATE :app:generateDebugAndroidTestBuildConfig UP-TO-DATE :app:generateDebugAndroidTestAssets UP-TO-DATE :app:mergeDebugAndroidTestAssets UP-TO-DATE :app:generateDebugAndroidTestResValues UP-TO-DATE :app:generateDebugAndroidTestResources UP-TO-DATE :app:mergeDebugAndroidTestResources UP-TO-DATE :app:processDebugAndroidTestResources UP-TO-DATE :app:generateDebugAndroidTestSources UP-TO-DATE :app:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources UP-TO-DATE :app:transformClassesAndResourcesWithExtractJarsForDebug :app:transformClassesWithDexForDebug UNEXPECTED TOP-LEVEL EXCEPTION: 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 '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 2 Information:BUILD FAILED Information:Total time: 1 mins 39.994 secs Information:1 error Information:0 warnings Information:See complete output in console

我的顶层是的gradle

My top level gradle is



    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()
        }
    }
    

My app level gradle is

<pre>

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

    android {
        compileSdkVersion 23
        buildToolsVersion '23.0.1'

        defaultConfig {
            applicationId "com.questo.rugved.questo"
            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'
        compile 'com.android.support:design:23.+'
        compile 'com.google.android.gms:play-services-identity:8.1.0'
        compile 'com.google.android.gms:play-services-plus:8.1.0'
    }

请帮忙。

推荐答案

也许这个链接可以帮助你。 <一href=\"http://stackoverflow.com/questions/32798816/unexpected-top-level-exception-com-android-dex-dexexception-multiple-dex-files\">link

Maybe this link helps you. link

这帮助了我:

android {
...
defaultConfig {
    ...
    multiDexEnabled true
    }
}

这篇关于执行失败的任务“:应用程序:transformClassesWithDexForDebug”,而谷歌实现登录Android版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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