摇篮排除模块不能正常工作? [英] Gradle exclude module does not work?

查看:170
本文介绍了摇篮排除模块不能正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在图书馆dupplication检查,我跑androidDependencies并得到这样的:

When checking for library dupplication, I ran androidDependencies and got this:

+--- com.melnykov:floatingactionbutton:1.2.0
|    \--- com.android.support:recyclerview-v7:21.0.2
+--- me.drakeet.materialdialog:library:1.2.2
+--- Android Workspace:SwipeLibrary:unspecified
|    \--- LOCAL: android-support-v4.jar
\--- com.android.support:appcompat-v7:22.0.0
     \--- com.android.support:support-v4:22.0.0
          \--- LOCAL: internal_impl-22.0.0.jar

所以我排除应用程序的build.gradle Android的支持V4(在孤单libs文件夹没有文件)

so I excluded android support v4 in the app build.gradle: (theres no file in libs folder)

   compile(project(':SwipeLibrary')) {
    exclude module: 'support-v4'
}

但显然这是行不通的。该dexDebug仍然抛出意外顶级例外:java.lang.IllegalArgumentException异常:已添加。我该如何摆脱这个问题?

but apparently it does not work. The dexDebug still throws UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added. How can I get rid of this issue?

推荐答案

有关大家谁都有同样的问题,因为我(dexDebug抛出异常话说库已添加 - 到support_v4相关的),也许这将帮助你:
转到斌/ dexedLibs并找到多余的库(在我的情况下,它是nineoldandroids因为android_support_v4已经拥有它),并重建项目。然而,你应该这样做需要您自担风险所以记得试图删除它们之前备份的文件。

For everyone who has the same problem as me (dexDebug throws Exception saying a library is already added - related to support_v4) maybe this will help you: Go to bin/dexedLibs and find the redundant libraries (in my case it is the nineoldandroids since android_support_v4 already has it) and rebuild your project. However you should do this at your own risk so remember to back up the files before attempting to delete them.

这篇关于摇篮排除模块不能正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆