Unable to Merge Dex after upgrading to Android Studio 3.0
Caused by: com.android.dex.DexException: Multiple dex files define Lcom/ogaclejapan/smarttablayout/utils/ViewPagerItems$Creator;
My guess is that you are not supposed to be using all three of these, but rather only one or two of them:
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
implementation 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
implementation 'com.ogaclejapan.smarttablayout:utils-v13:1.6.1@aar'
Android studio Unable to merge dex only on rebuild
Eventually i had to enable multidex although i had minimumVersion: 21
Maybe because when i created the project i had it set to 19 and i changed it to 21.
I haven't found why it worked all this time without multidex and now that i upgraded to Android studio 3 it requires it.
Cause: com.android.dex.DexException: Multiple dex files define Lorg/apache/commons/io/IOCase in Studio 3.0
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
Android studio 3.0 Beta4 can't rename a file and build error sometimes
This is a known issue, which, per the last comment:
Beta 4 doesn't include the fix. It will be in beta 5.
Related Topics
Android Gradle Apache Httpclient Does Not Exist
Android - Setonclicklistener VS Onclicklistener VS View.Onclicklistener
How to Always Run a Service in the Background
How to Manipulate the Camera Preview
Snappy Scrolling in Recyclerview
Solving "Adb Server Version Doesn't Match This Client" Error
Android: Share Plain Text Using Intent (To All Messaging Apps)
Implementing User Choice of Theme
Programmatically Collapse or Expand Collapsingtoolbarlayout
Convert Arraylist<Mycustomclass> to JSONarray
How to Simulate Touch from Background Service with Sendevent or Other Way
Checking Internet Connection on Android
How to Dynamically Remove Items from Listview on a Button Click
Connecting 2 Emulator Instances in Android
Flutter Run Error:You Have Not Accepted the License Agreements
In Androidx.Fragment.App.Fragment,Setuservisiblehint()Is Deprecated,And Not Executed,Why