"Duplicate class found" - IntelliJ and .class files
I coped with this same problem when cloning a project from Bitbucket. To solve it in IntelliJ:
Project Structure > Modules > Source > Source folder > <<"Eliminate the unwanted source folder">>
In my case, I had non-implemented classes in one source folder and a second source folder with the implemented classes (same class names).
I deleted one, built again, and the problem got solved.
Give it a try!
Make sure that you've configured the output directory to the source directory, disable the Exclude of the output directory to see your files.