I've had the same issue just now, and it turned out to be caused by a faulty attrs.xml
file in one of my modules. The file initially had two stylable attributes for one of my custom views, but I had deleted one when it turned out I no longer needed it. This was apparently, however, not registered correctly with the IDE and so the build failed when it couldn't find the attribute.
The solution for me was to re-add the attribute, run a clean project
after which the build succeeded and I could succesfully remove the attribute again without any further problems.
Hope this helps someone.