Android Studio can't detect my device


I’ve been learning Android a a little while now and at first Android Studio detected my device and I was able to test my programs fine but all of a sudden it can’t find it anymore. Everytime time I go to ‘reset adb’ in Android Device Monitor it always gives me this error:

‘Adb connection Error:An existing connection was forcibly closed by the remote host’

My computer detects my device but Android Studio does not:

I’ve tried reinstalling Android Studio.
I’ve also tried uninstalling and re installing the driver.
I have SAMSUNG Kies installed which apparently has all the driver I need

Nothing seems to work help please.