How do I tell Unity what port my Android emulator is running on?

I have an emulated Android device running on port 5556, but when I choose “Build & Run” Unity pushes my app to 5554. How do I tell it to forget 5554 and go to 5556? Or how do I make the device run on 5554?

If when you run adb devices in the command line you see emulator-5556 offline that means that Android adb found something on port 5556 that isn’t android, but it thinks is android.

To figure out what that thing is, start an Administrator console and run netstat -ab. I found out it was JetBrains Rider. So when I closed it, then everything worked.