Android emulator access to IPv6 possible? Network is unreachable

烈酒焚心 提交于 2019-12-11 11:10:18

问题


I am running an Android 4.0 emulator on windows 7 with a valid global ipv6 address. The emulator can access the ipv4 of the host machine addresses but not the ipv6 address. Pinging the ipv6 address from a third party site works.

Is there some magic trick to tell the emulator to use IPv6 as well? The emulator hasn't really got a lot of configuration options.

I always get the message "Network is unreachable".


回答1:


Starting from SDK 25.3.0 running Android Emulator in IPv6-only environment is finally supported. I tested with Android emulator version 26.0.3.0 running in Docker container with IPv6-only host. The main thing you need to know to do the trick is that it is only supported with emulator command and not supported e.g. for emulator64-x86 command. So the following will work:

$ emulator -avd android6.0-1 -sdcard /200MB.img ...

... and the following will not:

$ emulator64-x86 -avd android6.0-1 -sdcard /200MB.img ...

Hope it helps somebody.



来源:https://stackoverflow.com/questions/8609092/android-emulator-access-to-ipv6-possible-network-is-unreachable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!