简体   繁体   中英

How do I get the android emulator to use port 1900 when it's already being used by Windows?

I'm writing an android application that searches for devices using the UPnP port 1900, but when I telnet into the emulator and try to set up the port redirect like so:

redir add udp:1900:1900

It says:

Can't setup redirection, port probably used by another program on host

Port 1900 is being used on my computer by the Microsoft Plug and Play service and apparently cannot be disabled.

Is there any way around this? Short of side loading the apk on every change, what options do I have to test while developing?

I'm hoping I'm missing something obvious.

I was able to disable the SSDP Discovery Service in services. This freed up port 1900 and the above emulator redirection command now works. Even though this service will restart when I restart the system, it will allow me to debug and test via the emulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM