I just ran into this error and spent the last several hours racking my brain to figure out what I might have done wrong. I finally found it and figured I would post my mistake so that it might help if someone else were to run into the same problem. This was such a silly mistake that I imagine (and hope) that I will be alone in my discovery.
I discovered that one of my RemoteClass Declarations had an = sign after it so it looked like this. (Notice the = after the RemoteClass)
When it should be:
Such a simply little thing but because internal build errors do not give much to go on it took meticulously looking through each line of code for every class I had just been working with to find it.
Note this was in Flash Builder 4 but I added the same project into Flex Builder 3 and it caused the same error.
Oh well, lesson learned. Hope this hint helps someone else.