Entry name 'classes.dex' collided

AndroidAndroid StudioSigned Apk

Android Problem Overview


While trying to Generate a singed apk I'm getting this error

Entry name 'classes.dex' collided

Can someone tell me how to solve it? I recently changed the default package name which was com.exmaple to my app's name. It builds correctly but gives this error while trying to generate a signed APK

My android studio version is 4.1.2

Please let me know if you need more information and I will update the question accordingly

Android Solutions


Solution 1 - Android

You are probably facing this error because you already have a signed APK in your project's "release" folder. Please check for any existing APK and delete it, then try to generate once more.

Solution 2 - Android

I had the same problem and here's how I solved it easily:


 1. Build -> Clean Project
 2. Build -> Generate Signed Bundle / APK..

Solution 3 - Android

Delete Your Old Signed APK from your App folder and then Generate Signed APK

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSanjid ChowdhuryView Question on Stackoverflow
Solution 1 - AndroidTanzim ChowdhuryView Answer on Stackoverflow
Solution 2 - AndroidFélix MaroyView Answer on Stackoverflow
Solution 3 - AndroidVibhu Vikram SinghView Answer on Stackoverflow