0

I am getting following error :

Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.IResultReceiver found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:26.1.0) .......

andin my gradle file there is following dependencies

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
 }

I do not know what is the problem I tried multiple solution including this but did not get rid of this. Please help

  • hope this link helps https://stackoverflow.com/questions/55756647/duplicate-classes-from-androidx-and-com-android-support – Archu Mohan May 14 '19 at 11:59

1 Answers1

0

It seems like a conflict between androidX and support libs.

If you are not supporting yet androidX you need to replace

implementation 'com.google.android.material:material:1.0.0' by implementation 'com.android.support:design:28.0.0'.

If you still want to use the material version, make sure your gradle.properties file has androidX and Jetifier enabled.

android.useAndroidX=true
android.enableJetifier=true

Make sure you follow the necessary setup to use material. Check it out here.

yugidroid
  • 6,640
  • 2
  • 30
  • 45