I got 2 possible solutions for this problem:
(1st) : Download Revo Uninstaller and uninstall Android Studio from it. Revo is a powerful tool which removes all the files of the selected software including program data cache files and and all remaining settings and repositories.
After that reinstall Android Studio and select "do not import settings" during the installation.
Revo Installer Download Link :: (https://www.revouninstaller.com/revo-uninstaller-free-download/)
If it doesn't work the only remaining solution is ::
(2nd) : Go to Settings / Update and Security / Recovery / And reset
your pc. Select the option keep my files and reset it. Don't worry
about your other hard disk data it will only reset all the programs in
your C drive and will also save all the files of documents, downloads,
videos and images.
(I tried the second option first and it worked for me)
The problem occurred in the first place because antiviruses tend to
delete temp files and android studio saves its emulator files in temp
folder. To solve it just go to your antivirus settings and search for
"add exclusion" option and add these 4 folders there:
(instead of rajhr open the folder with your user name)
1 . C:\Users\rajhr\.android
2 . C:\Users\rajhr\.AndroidStudio3.5
3 . C:\Users\rajhr\AppData\Local\Android
4 . C:\Users\rajhr\AppData\Local\Temp\AndroidEmulator
And also add them to windows defender Settings :
1. Open windows defender
2. Go to firewall and network protection
3. Select allow app through firewall and add the 4 folders there.
Hope the answer helps you btw this is my first StackOverflow answer.