多个DEX文件定义Landroid /支持/ V4 / [英] multiple dex files define Landroid/support/v4/

查看:198
本文介绍了多个DEX文件定义Landroid /支持/ V4 /的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能编译该项目得到了以下错误编译:

I can not compile the project gets the following error compilation:

错误:未能执行任务:对myApp:dexDebug

Error:Execution failed for task ':myApp:dexDebug'.

com.android.ide.common.internal.LoggedErrorException:无法运行命令:           C:\ Program Files文件(x86)的\机器人\机器人工作室\ SDK \集结工具\ 21.0.2 \ dx.bat --dex - 输出C:\用户\ Android的工作室\ Android的工作室\对myApp \建立\中间体\ DEX \调试--input列表= C:\用户\对myApp \下载\ Android的工作室\ Android的工作室\对myApp \建立\中间体\ TMP \ DEX \调试\ libraryList.txt       错误code:           2       输出:           意外的顶级例外:           com.android.dex.DexException:多DEX文件中定义Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;               在com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)

com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files (x86)\Android\android-studio\sdk\build-tools\21.0.2\dx.bat --dex --output C:\Users\Android Studio\Android Studio\myApp\build\intermediates\dex\debug --input-list=C:\Users\myApp\Downloads\Android Studio\Android Studio\myApp\build\intermediates\tmp\dex\debug\libraryList.txt Error Code: 2 Output: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)

当然,这code解决我的问题。

Of course, this code solve my problem

配置{       所有* .exclude组:com.android.support',模块:支持-V4

configurations { all*.exclude group: 'com.android.support', module: 'support-v4'

可惜不符合我

dependencies {
    compile fileTree(include: '*.jar', dir: 'libs')

    compile 'com.android.support:support-v4:21.+'
    compile project(':PullToRefreshListFragment')
    compile project(':validator')
    compile project(':AndroidBootstrap')

    compile 'com.google.android.gms:play-services:6.+'
    compile 'com.android.support:appcompat-v7:21+'

    compile 'com.github.codechimp-org.apprater:library:1.0.+'
    compile 'com.sothree.slidinguppanel:library:+'
    compile 'me.grantland:autofittextview:0.2.+'
    compile 'io.realm:realm-android:0.71.0'

    compile ('com.loopj.android:android-async-http:1.4.6')
    {
        exclude group: 'com.google.android', module: 'support-v4'
    }

    compile('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {
        exclude group: 'com.google.android', module: 'support-v4'
    }

    compile ('io.nlopez.smartlocation:library:2.+')
    {
        exclude(group: 'com.google.android', module: 'gms:play-services')
    }
    configurations {
      // all*.exclude group: 'com.android.support', module: 'support-v4'

    }

我怎么能编译工程?

how can I compile the project?

推荐答案

图书馆作者应该解决这些问题。

the library authors should fix them

这篇关于多个DEX文件定义Landroid /支持/ V4 /的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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