To fix this problem, please follow the below steps.
1- Right-click on your class.
2 - Run AS-> Run Configurations
3. Click on main ->
Click on the Browse option and Choose your project name in project.
Click on the Apply button and after processing click on the Run button.