I am trying to execute and debug a program that I am developing in Android Studio (version: Koala | 2024.1.1 Patch 1) on my physical mobile (a Samsung Galaxy S23 Ultra) via WiFi.
The paring (be it via QR-code or via pairing code) always ends in "Connecting to device. This takes up to 2 minutes" and after that time invariably fails with "an error occured connecting device. Scan to try again", i.e. I NEVER get a working connection.
I had this working a few months back with the precursor of Koala (Jellyfish). It also hadn’t been very stable back then but typically after 2 or 3 attempts one got this working and once the connection was set up it worked OK. With Koala I have been completely out of luck so far. This is SO frustrating! Any ideas anyone what one could check and/or try to get this going?
I already rebooted my Laptop (MS Surface Pro 8) – didn’t make a difference.
2
Answers
You can try the following for a Samsung phone
You can resolve the issue from within Wi-Fi settings by disabling the Randomized MAC Address feature under Privacy. Using the device’s actual MAC address fixes the issue
You can also manually assign IP addresses to your device from your router, and disable DHCP
There are other options like using the command line to pair as well which can be found here
use command line(1):
success(2):
In my pc ,after method 2 is successful, it seems that method 1 can also be used.