I was able to fix the issue by simply creating a new Project and pasting the same code there. Maybe in the original project there was a bug or a problem in the file structure.