Ok, I\'ve been at this for two hours now and I see some other people have had this error, but I can\'t seem to match their causes/resolutions with mine.
Similar to other answers, in my case I had renamed the class but not the containing file. Every class should be declared in a file with the same name. So check that, too.