Not able to connect to xmpp server from android virtual device

I am a beginner. I started studing regarding chat app

I am trying to connect android virtual device to openfire xmpp server, but am unable to connect, I am getting

can anyone help me in connecting my android device top xmpp server

The code I am using is Paste ofCode

and Logcat I got is Paste ofCode with

Any help is appericiated Thanks