【问题标题】:Error:FAILURE: Build failed with an exception错误:FAILURE:构建失败并出现异常
【发布时间】:2016-11-08 20:16:31
【问题描述】:

请解决这个问题。 ?

错误:失败:构建失败并出现异常。

  • 出了什么问题: 任务 ':app:transformClassesWithDexForDebug' 执行失败。

    com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: 多个dex文件定义Lcom/google /android/gms/auth/api/signin/internal/zzk;

  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --debug 选项运行以获得更多日志输出。

【问题讨论】:

标签: android


【解决方案1】:

我建议尝试在 build.gradle(应用程序模块)上添加它。

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

我希望它能按照你的代码 sn-ps 工作。

【讨论】:

  • 这并不是实际需要的唯一步骤
  • @VladyslavMatviienko 还需要什么其他步骤?
猜你喜欢
  • 2018-07-28
  • 2018-10-22
  • 1970-01-01
  • 2018-10-29
  • 2020-06-13
  • 2021-09-24
  • 2016-05-18
  • 1970-01-01
相关资源
最近更新 更多