android-studio – 如何从工作室中排除支持v4库?

android-studio – 如何从工作室中排除支持v4库?,第1张

概述FAILURE:构建因异常而失败. >出了什么问题: 任务’:transformClassesWithJarMergingForDebug’的执行失败. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/content FAILURE:构建因异常而失败.

>出了什么问题:
任务’:transformClassesWithJarMergingForDeBUG’的执行失败.

com.android.build.API.transform.transformException:
java.util.zip.ZipException: duplicate entry: 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','src']            aIDl.srcDirs = ['.apt_generated','src']            renderscript.srcDirs = ['.apt_generated','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'    } }
总结

以上是内存溢出为你收集整理的android-studio – 如何从工作室中排除支持v4库?全部内容,希望文章能够帮你解决android-studio – 如何从工作室中排除支持v4库?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1122536.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存