Compile fails packaging for Android: weird C++ errors

I’m getting errors when I try to package for Android. For Win64, everything is fine. These are two examples of the errors I am getting:

error : implicit instantiation of undefined template ‘TSubclassOf’
error : member access into incomplete type ‘AActor’

I know that normally this kind of error is due to a missing #include of the relevant header. But I am pretty sure I have those - I don’t think it would compile for Windows without the right header includes. Does anyone know what else could cause an issue like this? The project compiles for Android fine on another machine, but I cannot tell what the difference is in the setups of the two. Anyone seen an issue like this before?

Thanks for any replies!

I finally resolved this. I don’t know what exactly the problem was, but I fixed it by replacing the entire project directory with a copy from Perforce. Luckily I had that.