'I'm getting an error while generating a signed apk bundle

I have made a simple app in android studio. It builds and runs fine when I test it on an android device, but when I tried to generate a signed apk for the app, This error pops up:

Entry name 'res/color/material_on_surface_disabled.xml' collided

I have no idea what this error means, and I have no folder named color in the res directory. Please tell me what I should do to resolve this error.



Solution 1:[1]

This happens sometimes if you are using the older gradle versions Try updating the gradle version in your project level build.gradle file

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ASHUTOSH DWIVEDI