Problem "Entry name 'META-INF...' collide - Android
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.
Álvaro Sánchez
Updated on June 14, 2022Comments
-
Á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.
-
Nicolas almost 4 yearsDoes this answer your question? Android Studio 0.4 Duplicate files copied in APK META-INF/LICENSE.txt Try to use
exclude "META-INF/androidx.vectordrawable**"
-
-
Malay M over 3 yearsClear the build using Menu -> Build -> Clean project, and it worked.
-
King Of The Jungle over 3 yearsFor some weird reason I had to 'Clean Project' twice before it worked.
-
Ornelio Chauque over 3 yearsMenu -> Build -> Clean project, worked for me. Thanks
-
Samuel T. Chou over 3 yearsThough 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 over 3 yearsThanks for this answer!! this solved my problem too.
-
CoolMind about 3 years
Build > Rebuild Project
helped me withEntry name 'META-INF/androidx.preference_preference.version' collided
error. -
mikebld almost 3 yearsthis should be marked as the answer, brilliant, thank you!
-
GSD.Aaz almost 3 yearsSee similar error and possible solutions
-
GSD.Aaz almost 3 yearsAlso you can try use something like that at your build.gradle(:app) : ``` applicationVariants.all { variant -> variant.outputs.all { outputFileName = "../../(" + System.currentTimeMillis() + ")" + outputFileName } } ```