I get this error while running ./gradlew assembleQ...
# android
j
I get this error while running ./gradlew assembleQaDebugAndroidTest in my project. What could be the problem and how can I fix it? It's about duplicate classes with androidx/appcompat. Thanks for the help in advance! 🙂
Execution failed for task ':commons:ui:checkQaDebugAndroidTestDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class androidx.appcompat.content.res.AppCompatResources found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.content.res.AppCompatResources$ColorStateListCacheEntry found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$1 found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatableTransition found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatedStateListState found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatedVectorDrawableTransition found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimationDrawableTransition found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$FrameInterpolator found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$Transition found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$1 found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$BlockInvalidateCallback found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$DrawableContainerState found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableWrapper found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.StateListDrawable found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.StateListDrawable$StateListState found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.DrawableUtils found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.ResourcesWrapper found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.TintContextWrapper found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.TintInfo found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.TintResources found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.VectorEnabledTintResources found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
m
The error relates to duplication of multiple classes. Are you facing this error on
./gradlew assemble
as well? I think there's a module that uses android.support and collids with androidx of your own. You could see the dependencies graph using
dependncies
task (
gradlew app:dependencies
for instance)
j
Hi @Mahdi Malv
./gradlew assemble
works just fine. In my project, there is no module using android.support.