Reputation: 109
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 ?
Upvotes: 7
Views: 2477
Reputation: 4311
On one of my test devices, this sometimes happens. One solution that sometimes works (2 times out of 2 so far) is to reboot the phone, and then no other change is needed (same Mac, same USB C cable, same android studio, etc.), and this time it remembers my previous authorizations.
Upvotes: 0
Reputation: 1452
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
Upvotes: 1