W/ManagedChannelImpl: [{0}] Failed to resolve name. status={1}
@AlleyOOP is right. Restarting emulator worked for me.
There is no Connection to the internet in the device which your app running on!
The above-mentioned issue occurred to me, this happens because of network connection. Try turning on and of your network connection if it is a physical device.
If Virtual device, Restart the device