我试图在我的应用程序中集成Google登录,我添加了以下库:
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文件中。
multiDexEnabled true
build.gradle
defaultConfig { multiDexEnabled true }