Can't upload code while XBEE attached

I recently bought the sparkfun XBee Starter Kit and everything was going fine until I was unable to connect the xbee with the shield attached. No matter what I did, it kept telling me that no devices were found. I was able to successfully connect one xbee using the explorer module but when I use the XBee shield it gives me an error.

I was able to determine that the problem was the shield being connected during uploading. I did this by trying to upload a code using the Arduino software. I was able to upload a code without the shield but with the shield I got an error. I tried doing this for both an Uno and a Mega. I also tried another computer and got the same results.

What do I need to do to fix this? I can't just take off the shield for uploading because I need to connect the shield for the XBee software.

What do I need to do to fix this? I can't just take off the shield for uploading because I need to connect the shield for the XBee software.

Another device connected to an arduino serial port can change the electrical characteristics of the tx/rx pins such that they cannot be used to upload code using them with the device attached.

I finally was able to upload an Arduino code to the Uno with the shield and XBEE attached, however I still can't connect the XBEE to the XBEE XCTU software, It's not the XBEE itself because it works if I use the XBEE Explorer. The problem is only when the shield is attached to the Arduino. So how do I go about fixing this?

The XBEE shield has dip pins or jumpers that allow code to be uploaded. Then the jumpers must be repositioned to allow the XBEE to communicate normally. The XBEE uses serial communication that conflicts with the USB communicating with the Arduino board.

The alternative is to remove the XBEE shield, program the Arduino, and put the shield back on the Arduino board.