错误:任务“:app:transformClassesWithJarMergingForDebug”执行失败

2024-04-26

再会。 在 Android Studio 中更新 google 存储库后,我遇到了问题

> Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry:
> android/support/v7/cardview/BuildConfig.class

我试图从播放服务中排除 android.support 组,但没有帮助。 当我在另一台电脑上开始我的项目时,我有:

> Error:Execution failed for task  ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry:
> android/support/annotation/AnimRes.class

我的构建.gradle:

apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "ru.alexeyk.myevents"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 16
        versionName "1.121"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile('com.github.nkzawa:socket.io-client:0.4.2') {
        exclude group: 'org.json', module: 'json'
    }
    compile files('libs/sentry-1.1.4.jar')
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:support-annotations:23.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.android.support:support-v4:23.1.0'
    compile 'com.android.support:cardview-v7:23.1.0'
    compile 'com.android.support:recyclerview-v7:23.1.0'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
    compile 'com.github.machinarius:preferencefragment:0.1.2'
    compile 'com.edmodo:cropper:1.0.1'
    compile 'com.makeramen:roundedimageview:2.1.1'
    compile 'org.ocpsoft.prettytime:prettytime:4.0.0.Final'
    compile 'com.yandex.android:mobmetricalib:2.00@aar'
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'com.google.android.gms:play-services-ads:8.1.0'
    compile 'com.google.android.gms:play-services-analytics:8.1.0'
    compile 'com.google.android.gms:play-services-identity:8.1.0'
    compile 'com.google.android.gms:play-services-gcm:8.1.0'
}

在终端中在根项目文件夹中执行:

./gradlew clean

它帮助了我。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

错误:任务“:app:transformClassesWithJarMergingForDebug”执行失败 的相关文章

随机推荐

  • Tensorflow 何时更新权重和偏差?

    张量流什么时候更新for循环中的权重和偏差 下面是tf的github上的代码 mnist softmax py https github com tensorflow tensorflow blob master tensorflow ex
  • 如何通过 Azure Active Directory 对多租户 ASP.NET 应用程序进行身份验证?

    我一直在我的数据中心使用 Azure Active Directory 试用许可证进行一些测试 我们公司拥有自己的托管服务和物理硬件 目前我们希望保持这种状态 尽管我们将来可能会研究将其全部转移到云服务 目前 我们正在尝试为使用 Azure
  • 在 Android 中“注入所有内容”是一种不好的做法吗?

    在研究依赖注入时 我发现了一些建议的方法注入一切 http frogermcs github io inject everything viewholder and dagger 2 example 和其他人说没有必要这样做 https s
  • .clone() 和 .html() 有什么区别?

    Jquery 的 clone 和 html 函数有什么区别 Jquery 文档指出 clone 方法对匹配的集合执行深度复制 元素 这意味着它复制匹配的元素以及所有 它们的后代元素和文本节点 在 HTML 文档中 html 可用于获取任意内
  • self.__class__ 的快捷方式

    有时我发现自己正在接触班级成员 在一个项目中 我什至在类定义中包含了类定义 在这种情况下我经常发现mysql输入self class
  • 具有稀疏矩阵的 numpy 元素外积

    我想在 python 中对三个 或四个 大型二维数组进行逐元素外积 值是 float32 四舍五入到小数点后两位 它们都具有相同的行数 n 但具有不同的列数 i j k 所得数组的形状应为 n i j k 然后 我想对结果的每一列求和 最终
  • 阻止请求 URL selenium Firefox Python

    我试图在访问网站时阻止某些 URL 这意味着我只提出继续所需的请求 有一个 url 自动加载 5 MB 代码我无法阻止通过 Firefox 配置文件禁用 css 我读到硒不允许那么多的控制 但我不确定是否有某种方法可以使用插件来设置它 但是
  • 有没有办法像 Visual Studio 一样让 Xcode 5 自动完成?

    Xcode 5 现在取代了 Xcode 4 我对这两种 IDE 的一个常见抱怨是它们不能非常积极地自动完成 在 Visual Studio 中 只要您按下非标识符键 如括号 逗号 点 空格等 就会提交自动补全 在 Xcode 5 上 您必须
  • 我应该如何使用 Mojo::UserAgent 处理 HTML META 标记?

    我必须处理一些配置错误的 Web 服务器 因此我开始处理 HTML 元标记以将信息反馈到 Web 用户代理对象中 我尝试了多种方法来做到这一点莫乔利西斯 http mojolicio us并决定在响应中寻找 完成 事件 我的目标是让其余代码
  • 我如何从另一个功能模块访问活动

    我正在创建一个即时应用程序 其中包括应用程序模块 基本功能模块 即时应用程序模块和另一个功能模块 问题是我无法从基本功能和功能模块访问应用程序模块的活动 并且基本功能模块和功能模块之间也是如此 但我能够从应用程序模块访问基本功能模块的活动
  • 如何使用其他语言的语音识别 android

    我有一个曾经有效的代码 但由于某种原因它突然停止工作 我正在尝试使用希伯来语语音识别 但似乎从几天前开始它才开始英语语音识别 这是我的代码 sr SpeechRecognizer createSpeechRecognizer getAppl
  • iOS:在 UI(Sub)Views 中处理 UIGestureRecognisers

    我想知道如何最好地解决以下问题 我有一个 ViewController 它的视图包含大量复杂的子视图 UIView的子类 由于复杂性 其中一些 UIView 初始化自己的 UIGestureRecognisers 并实现相应的目标操作 因为
  • flake8 仅对代码块禁用 linter

    我在 python 中有一个文件 如下所示 def test constructor for legacy json Test if constructor works for a legacy JSON in an old databas
  • 将多头 pandas 数据帧输出到 Excel 时摆脱索引

    我有一个 pandas 数据框 如下所示 header np array location location location location2 location2 location2 np array S1 S2 S3 S4 S5 S6
  • 如何将 PowerPoint(.ppt、.pptx)转换为每张幻灯片的多个图像?

    你们有一些能够将 PowerPoint 演示文稿文件转换为图像的 Net 库吗 使用添加引用Microsoft Office Interop PowerPoint dll 要将 PowerPoint 幻灯片转换为 PNG 图像 PowerP
  • 如何向 UiBinder 中的 Google Web Toolkit 弹性表添加行?

    我在哪里可以找到UiBinder http code google com p google web toolkit wiki UiBinderFlexTable 的模板 我在用谷歌网络工具包 http en wikipedia org w
  • 如何获取Windows 7中的“临时文件夹”?

    在 Windows 7 中 如何以编程方式获取系统临时文件夹 The 获取临时路径 http msdn microsoft com en us library windows desktop aa364992 28v vs 85 29 as
  • Android 数据库连接和游标哦天哪

    我读过很多关于如何在使用 android 时创建和使用数据库连接的博客和教程 尽管我有很多工作示例 但不同的实现会导致不同的问题 例如 我使用数据源类 Datasource和一个数据库辅助类 DBManagement 数据源 public
  • 区分映射和集合的模板

    在创建代码时common for set unordered set map and unordered map 我需要几种方法 其中处理实际上是不同的 我的问题是让编译器推断出要使用哪个实现 考虑这个例子 include
  • 错误:任务“:app:transformClassesWithJarMergingForDebug”执行失败

    再会 在 Android Studio 中更新 google 存储库后 我遇到了问题 gt Error Execution failed for task app transformClassesWithJarMergingForDebug