如何从工作室中排除support v4库?

2023-12-05

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

  • What went wrong: Execution failed for task ':transformClassesWithJarMergingForDebug'.

    com.android.build.api.transform.TransformException: java.util.zip.ZipException:重复条目:android/support/v4/content/Loader$OnLoadCompleteListener.class

build.gradle 文件中的代码

   apply plugin: 'com.android.application'


dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    //compile project(':ActionBarSherlock-4.1.0')
    compile project(':GooglePlayServicesLibrary')
    compile files('libs/eventbus-2.4.0.jar')
    compile (project(':AndroidBetterPickers')){ exclude module: 'support-v4' }
    compile (project(':ZxingFragmentLib')){ exclude module: 'support-v4' }
    compile (project(':RobotoTextView')){ exclude module: 'support-v4' }
    compile (project(':PanesLibrary')){ exclude module: 'support-v4' }
    compile (project(':ShowCaseViewLibrary')){ exclude module: 'support-v4' }
    compile (project(':ActionBarSherlock-4.1.0')){ exclude module: 'support-v4' }



}

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'
    }



}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
    }
}



android {
    packagingOptions {

        exclude  'META-INF/maven/com.nineoldandroids/library/pom.xml'
        exclude  'META-INF/maven/com.nineoldandroids/library/pom.properties'
        exclude  'META-INF/services/javax.annotation.processing.Processor'

    }



    dexOptions {
        javaMaxHeapSize "4g"
    }
    compileSdkVersion 19
    buildToolsVersion '22.0.1'

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 15
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }




    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['.apt_generated','res','src']
            resources.srcDirs = ['.apt_generated','res','src']
            aidl.srcDirs = ['.apt_generated','res','src']
            renderscript.srcDirs = ['.apt_generated','res','src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }




}

我已经这样做了

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

如何从工作室中排除support v4库? 的相关文章

随机推荐

  • 在 C 中哪种方式更好地将数组作为函数参数传递?

    有 3 种方法将数组作为函数参数传递 形式参数为一个指针 e g void myFunction int param 形式参数为一个指定大小的数组 e g void myFunction int param 10 形式参数为未调整大小的数组
  • 使用 .htaccess 清理 URL

    我正在尝试重定向我的域上的链接 我想要实现的是 当用户点击链接时 mydomain com index php dir myfolder 我希望他被重定向到这个 URL 但浏览器栏应该显示这个 URL mydomain com myfold
  • 将txt解析为块

    我有一个txt文件 其结构如下 start id 1 date 21 05 2018 summ 500 end start id 7 date 23 05 2018 summ 500 owner guest end 我需要在字典列表中解析它
  • Silverlight - Scrollviewer 中的 DataGrid,Column.Width="*" 使数据网格占据多个屏幕宽度

    当我进行以下设置时 宽度为 的最后一列会导致数据网格创建巨大的水平滚动条 将网格扩展到屏幕的多个宽度 我不太确定为什么会这样 但我确实需要一种方法来避免这种情况 我不想用 长度 模拟 列 编辑 显然我不是唯一注意到这一点的人 http co
  • 在 macos 上使用 pyinstaller 编译 mediapipe 时出现问题

    我在 macos 上通过 pyinstaller 使用 mediapipe 编译项目时遇到问题 到目前为止我尝试过 pyinstaller windowed noconsole pose edge py pyinstaller onefil
  • AJAX 响应 XML 错误

    在发出 AJAX 请求和处理响应时 我遇到了一些奇怪的问题 我正在对 xml 文件进行 ajax 调用 但是 当我收到响应时 xhr responseText 属性在 Firefox 中工作正常 但在 IE 中却不行 另一件事是我试图将 x
  • Tradingview Pine 脚本保存策略输入时的收盘价

    嘿 我正在尝试将策略时的收盘价保存到变量中 以便稍后可以使用它退出 if condition strategy entry long true buyprice close strategy exit exit long when clos
  • 跟踪每个进程的 CPU 和内存使用情况

    我怀疑我的一个应用程序占用的 CPU 周期比我想要的要多 问题是 它突然发生 仅仅查看任务管理器对我没有帮助 因为它只显示立即使用情况 有没有办法 在 Windows 上 跟踪某些进程的 CPU 和内存使用历史记录 例如 我将开始跟踪 fi
  • C# - 反序列化 JSON 对象

    我正在尝试将以下 json 绑定到一个列表 请注意 每个字符串可以包含多个元素 因此列表将如下所示 红黑 blue 橙色 蓝色 红色 黑色 粉色 shoes red black shoes blue shoes orange blue re
  • Android 上的 VOIP 库或示例代码

    提前致谢 我正在 Android 上开发 VOIP 应用程序 是否有任何开源代码 库或示例应用程序可供 VOIP 软件开发人员快速创建 VOIP 应用程序 提前致谢 其实我不知道使用过程voip在android应用程序中 那么如何在应用程序
  • 如何在 Java 中使用 Selenium WebDriver 打开新选项卡?

    如何使用 Java 中的 Selenium WebDriver 又名 Selenium 2 在现有 Firefox 浏览器中打开新选项卡 仅供任何在 Ruby Python 和 C 绑定 Selenium 2 33 0 中寻找答案的人使用
  • SwiftUI 关闭模式

    由于 SwiftUI 是声明式的 因此没有dismiss方法 如何添加关闭 关闭按钮DetailView struct DetailView View var body some View Text Detail struct Conten
  • C++中的简单线程池

    谁能给我提供一个 C 线程池的示例实现吗 我正在寻找一个非常基本的 没有太多复杂性的 适合线程初学者学习的 看看英特尔的线程构建块 我不知道该图书馆在多大程度上符合您的 简单 标准 但它似乎经过深思熟虑和彻底 我认为如果你想在 C 中进行线
  • 重写为 MVC 后 GUI 不工作

    我正在练习 MVC 风格的编程 我在一个文件中有一个 Mastermind 游戏 工作正常 也许除了 检查 按钮在开始时不可见之外 http paste pocoo org show 226726 但是 当我将其重写为模型 视图 控制器文件
  • 如何从 Fragment 中启动活动? [复制]

    这个问题在这里已经有答案了 我有一组选项卡FragmentActivity每个都有自己的片段 当我尝试通过以下方式从该片段中启动新活动时onClickListener 并使用startActivity myIntent 方法 我的应用程序强
  • 使用 id 创建元素?

    我正在尝试修改此代码以也为该 div 项目提供一个 ID 但是我在 google 上没有找到任何内容 并且 idName 不起作用 我读到一些关于append 但是对于看起来很简单的任务来说似乎相当复杂 那么有其他选择吗 谢谢 g docu
  • 我更新了 Android Studio,现在 gradle 项目同步失败

    我更新了 Android Studio 现在出现以下错误 1 Gradle项目同步失败 基本功能 例如编辑 调试 将无法正常工作 2 无法通过代理建立隧道 代理返回 HTTP 1 1 403 请求被 Privoxy 阻止 我在 gradle
  • 当参数是列表时,惰性求值如何工作?

    根据我的理解 惰性求值是指参数在传递给函数之前不求值 而是仅在实际使用它们的值时才求值 但在 haskell 教程中 我看到了一个例子 xs 1 2 3 4 5 6 7 8 doubleMe doubleMe doubleMe xs 作者说
  • WordPress 博客 iPhone 应用程序阅读器 [关闭]

    Closed 这个问题不符合堆栈溢出指南 目前不接受答案 我有一个 WordPress 博客 有点像当天交易的报价 我希望制作一个简单的 iPhone 应用程序来自动下载博客内容 想想 RSS 类似 我希望我的读者能够保存他们最喜欢的帖子
  • 如何从工作室中排除support v4库?

    失败 构建失败并出现异常 What went wrong Execution failed for task transformClassesWithJarMergingForDebug com android build api tran