I am working at an android studio project and I always work with my own physical device SAMSUNG S7. It always worked (for a few weeks now) but today suddenly from one moment to the other my device cant be recognized by android studio anymore. I didnt change any settings! I just changed a line in the code (like a hundred times before) and after it my device is not shown in the list of devices. There is only the virtual device which is useless for me because it never displays the app correctly. Just my physical device shows the app correctly so now I need help. Otherwise I cannot continue programming.
I tried to reopen android studio and restart my phone but it didnt help.
Changing the cable plug mode (credits to Hack06)
Just swipe down the OS status bar, and tap on the device, then choose another connection mode.
Installing Samsung's development drivers
When this doesn't work, try installing the drivers provided by Samsung to improve developments. These can be found here.
USB Debugging
USB debugging may have failed. Or all of the developer settings have been reset. Try that
Reboot your phone into ODIN mode
Caution: ODIN mode is in charge for flashing your Android phone, and if you’re not careful, you can cause permanent damage to your phone.
This solution applies only to Samsung’s devices, since they are the only devices with access to ODIN mode.
A guide how to access ODIN mode for your phone can be found here.
Install KIES software
If nothing worked till here you might want to download KIES software. KIES software only works for Samsung’s devices.
Samsung KIES is part of Samsung Smart Switch.
Download here.
Google - Android USB Driver
My last suggestion would be to install Google's Android USB drivers. An official guide can be found here.