I've just upgraded to a Pixel 7 Pro from an HTX U12+ and am having problems testing my apps on the new phone.
Android Studio is 2022.2.1 Patch 2 running on Windows 11, with all of the latest Android SDK etc patches applied that have been offered.
The HTC U12+ is on Android 9 and the Pixel 7 Pro is on Android 13 with latest security updates installed.
My apps still install as debug or release version on the HTC phone, but when I try to install from Android Studio on the Pixel 7 Pro, the phone disconnects from Android Studio as soon as the install is attempted.
If I disconnect the phone and reconnect it reappears in the drop down, but the same happens again if I try again.
I have tried de-authorising all debug/dev devices from the phone to forget the computer. I get the message to accept the RSA key again, but still the same problem.
I have even tried cleaning the project and rebuilding, deleting the intermediate files and the debig apk etc... but still the same result.
If I plug the HTC U12+ in and hit run it builds and installs without issue.
Obviously I can continue to use the HTC for testing, but that is stuck at Android 9 and I want to test on a physical Android 13 device before release. (I am already testing on Android 13 virtual devices).
It turns out that this was a USB-C port issue on the laptop.
Not actually a fault on the port, but swapping to another port resolved the issue. A few days later the 'suspect' port was working again. How did I find the suspect port was working again? Well, the 'alternative' port displayed the exact same issue as the suspect port did originally.
So, I didn't actually get to the bottom of why the problem occurred, but swapping to another USB port on teh laptop got me up and running.