getting AdMob ads in the Android emulator

The emulator uses the first NIC it finds, whether that one actually has access to the Internet or not.
(NIC = Network Interface Controller – aka network adapter)

If it doesn’t, the emulator won’t be able to access the Internet.  This made testing AdMob adverting in my app rather difficult.

My develoment machine (actually, virtual machine, but that’s beside the point) has two NICs; the emulator locks onto the wrong one.

My workaround is to disable all the NICs except for the one the emulator should use, then start the emulator.  The emulator will use the only enabled NIC, and will be able to access the Internet, and be able to show AdMob advertising.

It’s safe to re-enable any other NICs until the emulator is closed.  When you restart the emulator you’ll have to disable the other NICs again.

If anyone knows of settings to force the emulator to use a specific NIC, please let me know.  (I don’t use a proxy, btw.)

All the best,
Alan

Advertisements
%d bloggers like this: