Home > Mobile >  Getting Entry name 'classes.dex' collided error while building app
Getting Entry name 'classes.dex' collided error while building app

Time:09-28

I'm facing this error every single week at least 4 times. It usually happens when I switch building my app from Phone to Emulator. And usually I have to clean project and invalidate cache/restart entire studio 4-10 times in a row in order to remove this error. Is there any normal way to fix this? I think this is clearly some Android Studio bug which is happening randomly and it is starting to slow me in development because I cant build my app for 30-40 minutes straight.

Sometimes I have to uninstall app from phone or emulator or completely wipe out emulator in order to fix this.

Full error:

> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > Entry name 'classes.dex' collided

CodePudding user response:

This error usually occurs when there exists a file with a same name. Do you have any signed apk in your releases folder? If it's there, delete it and it may stop colliding. If it persists, try Clean Project and generate a signed apk.

  • Related