问题
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