Cause: com.android.dex.DexException: Multiple dex files define Lorg/apache/commons/io/IOCase in Studio 3.0

后端 未结 2 956
别跟我提以往
别跟我提以往 2021-02-06 14:36

I am developing one project. This is working fine with Android studio 2.3.3, but what happen is when i updated my Android Studio 3.0 and open my project then it can\'t assembled

相关标签:
2条回答
  • 2021-02-06 15:31

    I agree with @CommonsWare that there is one another lib also contain commons-io in your project.

    There is an option to fix this conflict issue in gradle dependency. Add below code in your app level build.gralde file.

    configurations.all {
        resolutionStrategy.dependencySubstitution {
            substitute module('org.apache.commons:commons-io:1.3.2') with module('commons-io:commons-io:1.3.2')
        }
    }
    

    Reason is that why that 'org.apache.commons:commons-io:1.3.2' is conflict Check this stack overflow question's answer.

    Note:- To know more about apache commons collections and its different versions check this answer

    0 讨论(0)
  • 2021-02-06 15:37

    If you're explicitly including this dependency in your build.gradle file:

    org.apache.commons:commons-io:1.3.2
    

    replace it with this one (or a later version):

    commons-io:commons-io:2.4
    

    You may need to do a clean/rebuild to get rid of a cached version. The org.apache... named one is both misnamed and now very out-of-date. Weirdly, some other org.apache... named ones are apparently OK.

    0 讨论(0)
提交回复
热议问题