I know this is an old question but I just solved my own version of it and perhaps this might help someone.
After two days of tearing my hair out with this, I finally got around it by deleting the raw
folder, then recreating it and dropping the file(s) back in.
After that, another Project > Clean
and it at last compiled.