I have a library project which is using androidx dependency in it.
implementation 'androidx.appcompat:appcompat:1.0.0-rc01'
After adding library project in my app, i am getting multiple errors related to dexMerger , MultiDex , Multiple dex files define Landroid/support/v4/...
.
So i searched for that file by using window+O (Navigate --> Class). Then i found that same class is used in 'androidx.appcompat:appcompat:1.0.0-rc01' and android.support.v4.. libraries . So I tried to exclude like below -
implementation('androidx.appcompat:appcompat:1.0.0-rc01') {
exclude module: 'support-v4'
}
Also i have added multidex true but nothing helped. I read about AndroidX looks like it contains many classes that are similar to support libraries. What should be done in this case ? I have latest version of Android Studio and my compileSdkVersion is 28. My all dependencies are up to date.
I have already added multidex dependency and my application class is also extending MultiDexApplication.