0

After upgrading Android Studio (forced via prompt) the following error occurs when attempting to create an APK file: Duplicate class android.support.customtabs.ICustomTabsCallback found in modules browser-1.0.0-runtime.jar (androidx.browser:browser:1.0.0) and jetified-anroid-support-customtabs-23.3.0.jar (anroid-support- customtabs-23.3.0.jar) There are many of them...

I applied the fix recommended in this post: which is to add

android.useAndroidX=true and android.enableJetifier=true

to the gradle.properties file

This did not work for me.

What can I look for to fix?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Eric Langley
  • 183
  • 1
  • 2
  • 9
  • Look at this https://stackoverflow.com/questions/56029393/why-im-getting-duplicate-class-when-running-my-android-project/56029604#56029604 – A Farmanbar Dec 09 '19 at 10:21

1 Answers1

0

I don't know whether you knew this or not but Google has now stopped future support for the Support libraries like the one you have used jetified-anroid-support-customtabs-23.3.0.jar Fear not, because instead the support has been moved towards AndroidX, as stated androidx.browser:browser:1.0.0.

So, with a glance, I see that you have two duplicate classes that arise from both AndroidX library as well as the Support Library.

To Fix: Check your dependencies, and make sure there is no support library version, and instead migrate everything to AndroidX. This can be done both manually as well as via Refactor>Migrate to AndroidX... Do note that some libraries need to be updated manually. More about AndroidX you can see here: What is AndroidX?

Hope this helps.

bijaykumarpun
  • 677
  • 4
  • 9