If you use IntelliJ IDEA, try the following:
- From 'File', select "Invalidate Caches/ Restart" option.
- Confirm this action by clicking the "Invalidate and Restart" button.
- Then the IDEA will be restarted.
- You will then find a fresh copy of your project.
- You then need to import/ change project format to the Maven project. IDEA will show you options at the bottom right corner.
- After this, you should be able to run your project.