I have updated my android studio from 3.5.x to 3.6 today and getting an error while generating signed apk for build variant showing the following message - Entry name 'res/layout/test_toolbar.xml' collided
I don't have any layout named like this one in the whole project at all. I have a custom build variant named "stage" and whenever I am trying to build a signed apk, it always fails. I count find any solution yet. Please help me with this issue. Thanks
Update: The same issue can occur with these following messages too (As I found it in AS - 3.6.1 - Continues with 4.x.x sometimes). So don't worry about these kinds of unknown and not resolvable messages. So far I found two new types of messages while generating signed apk:
Entry name 'kotlin/collections/MapWithDefault.kotlin_metadata' collidedAccess Denied
The result is the same. Sometimes you may need to Invalidate Cache and Restart your AS for this. Let me know your findings. Thanks
The fast solution is: (as of the most popular answer and I agree)
- delete projectFolder\build delete projectFolder\debug
- delete projectFolder\release
- delete projectFolder\app\build
- delete projectFolder\app\build\debug
- delete projectFolder\app\build\release
So you need to delete all of the builds, debug and release directories.
Note that you may be not able to delete the whole debug and release directories, but you can delete all of its contents.
