Error Connecting XBEE Shield with UNO/Mega

Hallo ,

I connected with a XBEE shield made for Uno and tried to upload the code given at this link, here

https://learn.sparkfun.com/tutorials/xbee-shield-hookup-guide#example-communication-test

But i am getting forllowing errors,

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

I tried with using mega but the error remains the same.

Thanks for your suggestions