Make sure that the sources are defined in the "Module" section inside the "Project Settings".
How to access: File/Project Structure/Modules
File/Project Structure/Modules