Adding XBee shield to arduino

My arduino works fine with a temp/humidity sensor connected by cable but when I add an XBee plus arduino shield with an XBee on it it says it is "not in sync"

Or in full "avrdude: stk500_getsync: not in sync"

Wonder if anyone can help