Android 2.2 and “Bad address family” on Socket Connect

后端 未结 3 1086
刺人心
刺人心 2021-01-02 12:27

I have a fairly simple game that works perfectly on every version now up through 2.1, but with the new 2.2 (Froyo) release I am unable to create a socket. I am using the mi

3条回答
  •  渐次进展
    2021-01-02 12:42

    this was a bug and has been fixed: http://code.google.com/p/android/issues/detail?id=9431

    you should be very careful with the java.net.preferIPv6Addresses workaround, because there are devices and networks where you do want IPv6.

    (and, as the original poster found, if you can use io rather than nio, you generally should.)

提交回复
热议问题