Clean Project fixed my problem.
I also faced the same issue. it occurs when you run> flutter clean command that actually did’t clean all the files inside build directory of your project, and causes the issue.
So the simple solution is, delete your build directory manually. If it alerts “File in Use” dialogue then simple do the following steps
- open the run command with shortcut Window+R
- type resmon.exe it will open the resource monitor
- click on “CPU” tab
- click on “Associated handles” and type build in search bar
- right click on java.exe and end process
- restart your IDEA and run your project the problem is solved