# Duplicate class error

**URL:** https://discuss.gradle.org/t/duplicate-class-error/33950
**Category:** Help/Discuss
**Created:** [November 20, 2019, 5:38am UTC](https://discuss.gradle.org/t/duplicate-class-error/33950 "2019-11-20T05:38:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![grmata](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@grmata](https://discuss.gradle.org/u/grmata)
#### Post date: [November 20, 2019, 5:38am UTC](https://discuss.gradle.org/t/duplicate-class-error/33950/1 "2019-11-20T05:38:11Z")

</div>

How do I resolve “Duplicate class” error during the build?  
I’m new to gradle and android development so please try to explain as much as possible.

I’m using Android Studio to add some functionality to a project that is generated in a game development tool.

In the Module:App build.gradle file, AS has added the dependency:

implementation ‘com.android.support:design:28.0.0’

Which is needed to use Snackbar.  
But this conflicts with many classes found in the .jar already used in the project com.android.support:support-v4:24.0.0

How do I deal with this?

---

<div class="post-metadata">

### Author: ![Nikhilareddy57](https://avatars.discourse-cdn.com/v4/letter/n/51bf81/32.png) [@Nikhilareddy57](https://discuss.gradle.org/u/Nikhilareddy57)
#### Post date: [May 20, 2020, 1:19pm UTC](https://discuss.gradle.org/t/duplicate-class-error/33950/2 "2020-05-20T13:19:13Z")

</div>

This might be because of both dependencies using different versions of same classes. Try upgrading support-v4:24.0.0 dependency to a version compatible with design:28.0.0
