'"Allow USB debugging?" Keeps Appearing

When debugging my app using Android Studio with a Samsung Galaxy Tab S5e connected via USB, this stupid "Allow USB debugging?" window keeps popping up. I tap in the checkbox that says "Always allow from this computer" and then tap the "Allow" button and it immediately asks me again. Then during my debug session, it will pop up again randomly and break the connection. It's starting to make debugging almost impossible. I've tried going to the device Settings/Developer Options and Revoke USB debugging authorizations, turned USB debugging off and on again, unplugged the USB cable, rebooted my device, closed Android Studio, deleted the adbkey and adbkey.pub files in my computer's /Users/xxxx/.android folder and every combination of those without any success. I've had it working okay in the past but recently it's started popping up this window relentlessly. Does anyone know what's going on here and how to fix this mess ?



Solution 1:[1]

Might be a faulty USB cable. Try with a different one? Or perhaps try different USB ports on your PC.

Also, have you tried restarting the adb daemon?

adb kill-server
adb start-server

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 zen_of_kermit