Yes, any mobile phone or device can be infected with a virus. However, Android is working hard to protect your mobile devices and protect them from viruses. Unfortunately, there are still people out there that love to hack software or a company website or server. It seems to be fun for them to find different ways to infect these devices with viruses.
You will need to protect your own device and make sure you use caution when attaching to a WiFi. Here are a few measures you can try or use to help protect your device: