当前位置: 首页 > 面试题库 >

Java com.android.build.transform.api.TransformException

经兴安
2023-03-14
问题内容

我试图在我的应用程序中集成G​​oogle登录,我添加了以下库:

compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'

还将其添加到项目构建gradle:

classpath 'com.google.gms:google-services:1.4.0-beta3'

还要添加插件到应用程序构建gradle:

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

然后添加所需的权限,但是当我尝试运行我的应用程序时,收到此错误:

    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.8.0\bin\java.exe'' finished with non-zero exit value 2

问题答案:

尝试添加multiDexEnabled true到你的应用程序build.gradle文件中。

 defaultConfig {
    multiDexEnabled true
}


 类似资料:

相关阅读

相关文章

相关问答