我尝试在我的Android应用程序中添加spring但应用程序不运行.
我真的不知道为什么我的跑步失败了.你能帮我解决这个问题,谢谢
这是我的app / build.gradle配置:
apply plugin: 'com.androID.application'androID {compileSdkVersion 23buildToolsversion "23.0.3"defaultConfig { applicationID "com.nizar.abdelhedi.accesscontrol" minSdkVersion 16 targetSdkVersion 23 versionCode 1 versionname "1.0"}buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro' resValue "string", "host_name", "access-control-web/rest/roles/attendance" }} configurations { all*.exclude module: 'httpclIEnt' all*.exclude module: 'commons-logging'}packagingOptions { exclude 'meta-inf/DEPENDENCIES.txt' exclude 'meta-inf/liCENSE.txt' exclude 'meta-inf/NOTICE.txt' exclude 'meta-inf/NOTICE' exclude 'meta-inf/liCENSE' exclude 'meta-inf/DEPENDENCIES' exclude 'meta-inf/notice.txt' exclude 'meta-inf/license.txt' exclude 'meta-inf/dependencIEs.txt' exclude 'meta-inf/LGPL2.1'}dependencIEs { compile filetree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.androID.support:appcompat-v7:23.4.0' compile 'com.androID.support:design:23.4.0' compile 'com.github.vajro:MaterialDesignlibrary:1.6' compile 'com.github.blackfizz:eazegraph:1.2.2@aar' compile 'com.nineoldandroIDs:library:2.4.0' compile 'com.github.lecho:hellocharts-library:1.5.8@aar' compile 'org.springframework:spring-context:4.2.7.RELEASE'}}
这是我的错误消息
information:Gradle tasks [:app:assembleDeBUG]:app:preBuild UP-TO-DATE:app:preDeBUGBuild UP-TO-DATE:app:checkDeBUGManifest:app:preReleaseBuild UP-TO-DATE:app:prepareComAndroIDSupportAnimatedVectorDrawable2340library UP-TO-DATE:app:prepareComAndroIDSupportAppcompatV72340library UP-TO-DATE:app:prepareComAndroIDSupportDesign2340library UP-TO-DATE:app:prepareComAndroIDSupportRecyclervIEwV72340library UP-TO-DATE:app:prepareComAndroIDSupportSupportV42340library UP-TO-DATE:app:prepareComAndroIDSupportSupportVectorDrawable2340library UP-TO-DATE:app:prepareComGithubBlackfizzEazegraph122library UP-TO-DATE:app:prepareComGithubLechoHellochartslibrary158library UP-TO-DATE:app:prepareComGithubVajroMaterialDesignlibrary16library UP-TO-DATE:app:prepareDeBUGDependencIEs:app:compileDeBUGAIDl UP-TO-DATE:app:compileDeBUGRenderscript UP-TO-DATE:app:generateDeBUGBuildConfig UP-TO-DATE:app:mergeDeBUGShaders UP-TO-DATE:app:compileDeBUGShaders UP-TO-DATE:app:generateDeBUGAssets UP-TO-DATE:app:mergeDeBUGAssets UP-TO-DATE:app:generateDeBUGResValues UP-TO-DATE:app:generateDeBUGResources UP-TO-DATE:app:mergeDeBUGResources UP-TO-DATE:app:processDeBUGManifest:app:processDeBUGResources:app:generateDeBUGSources:app:incrementalDeBUGJavaCompilationSafeguard UP-TO-DATE:app:compileDeBUGJavaWithJavac UP-TO-DATE:app:compileDeBUGNdk UP-TO-DATE:app:compileDeBUGSources UP-TO-DATE:app:buildInfoDeBUGLoader:app:transformClassesWithExtractJarsForDeBUG UP-TO-DATE:app:transformClassesWithInstantRunVerifIErForDeBUG UP-TO-DATE:app:transformClassesWithJavaResourcesverifIErForDeBUG UP-TO-DATE:app:mergeDeBUGJnilibFolders UP-TO-DATE:app:transformNative_libsWithMergeJnilibsForDeBUG UP-TO-DATE:app:processDeBUGJavaRes UP-TO-DATE:app:transformResourcesWithMergeJavaResForDeBUG FailedError:Execution Failed for task ':app:transformResourcesWithMergeJavaResForDeBUG'.> com.androID.build.API.transform.transformException: com.androID.builder.packaging.DuplicatefileException: Duplicate files copIEd in APK meta-inf/spring.schemas file1: C:\Users\abdelhedi\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context.2.7.RELEASE9f2906943827d37de89240dbac8fe4b315a838\spring-context-4.2.7.RELEASE.jar file2: C:\Users\abdelhedi\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop.2.7.RELEASE\bd65f97ba61fd3dcc0b74765d3fa388aeb388aa7\spring-aop-4.2.7.RELEASE.jar file3: C:\Users\abdelhedi\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans.2.7.RELEASE\ae0501728c0ee072e25cb5e11b63b883c0786b4b\spring-beans-4.2.7.RELEASE.jarinformation:BUILD Failedinformation:Total time: 2.634 secsinformation:1 errorinformation:0 warningsinformation:See complete output in console
解决方法:
添加另一个到您的packagingOptions
exclude 'meta-inf/spring.schemas'
编辑:keeeeep加入它!看起来你有一大堆重复
每当您看到Exception时:在APK BLAH / blah.blah中复制的重复文件
添加另一个排除’BLAH / blah.blah’
总结以上是内存溢出为你收集整理的Android Gradle在APK META-INF中复制的重复文件全部内容,希望文章能够帮你解决Android Gradle在APK META-INF中复制的重复文件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)