Problem "Entry name 'META-INF...' collide - Android

18,889

Solution 1

I had the similar problem with "META-INF/androidx.gridlayout_gridlayout.version' collided". It took my 4 hours and finally i resolved it. Method which worked for me i am not sure that will for you too but you can try. go to Menu Build > Rebuild Project thats it.

Solution 2

In my case in the output directory there has already been a file called app-debug.apk and for whatever reason the android sdk could not overwrite it. The apk has been generated as soon as I deleted or renamed the old version.

Solution 3

Use in the below steps will working perfectly.

Menu -> Build -> Clean project

that's all. Enjoy your coding.

Solution 4

  • Click on Build -> Clean Project
  • Click on File -> Invalidate Caches / Restart

Still you have the same error then delete debug and release folder from the app folder then restart the IDE

Solution 5

Delete the previous APK you build and try again. it helps me to solve this issue.

Share:
18,889
Álvaro Sánchez
Author by

Álvaro Sánchez

Updated on June 14, 2022

Comments

  • Álvaro Sánchez
    Álvaro Sánchez almost 2 years

    I have added some things to my mobile application, such as adds or animation-lists. The thing is that I could generate APKs perfectly some days ago and, since the moment y added those things, Android Studio does not let me generate them. It has the following error.

    Entry name 'META-INF/androidx.vectordrawable_vectordrawable.version' collided

    Or these other ones:

    Execution failed for task ':app:packageDebug'. A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Entry name 'META-INF/androidx.vectordrawable_vectordrawable.version' collided

    I have no idea what could get wrong. Thank you so much.

  • Malay M
    Malay M over 3 years
    Clear the build using Menu -> Build -> Clean project, and it worked.
  • King Of The Jungle
    King Of The Jungle over 3 years
    For some weird reason I had to 'Clean Project' twice before it worked.
  • Ornelio Chauque
    Ornelio Chauque over 3 years
    Menu -> Build -> Clean project, worked for me. Thanks
  • Samuel T. Chou
    Samuel T. Chou over 3 years
    Though I feel this will work in most situation, this did not really solve mine. @tmt 's answer worked: remove/rename the already-generated apk (and json).
  • Jose R
    Jose R over 3 years
    Thanks for this answer!! this solved my problem too.
  • CoolMind
    CoolMind about 3 years
    Build > Rebuild Project helped me with Entry name 'META-INF/androidx.preference_preference.version' collided error.
  • mikebld
    mikebld almost 3 years
    this should be marked as the answer, brilliant, thank you!
  • GSD.Aaz
    GSD.Aaz almost 3 years
    See similar error and possible solutions
  • GSD.Aaz
    GSD.Aaz almost 3 years
    Also you can try use something like that at your build.gradle(:app) : ``` applicationVariants.all { variant -> variant.outputs.all { outputFileName = "../../(" + System.currentTimeMillis() + ")" + outputFileName } } ```