Are you using the charger cord that came with your phone to charge it and plugging directly into the wall? If not, on either count, it can lead to the battery not charging correctly and causing the red x. It can also show up if the charger cord is the right one, and direct plugged into the wall, but the cord (or the outlet) isn't putting out the right power to charge the device correctly.
Now if you aren't charging it when this shows up, then it may be either a dead battery or the device needs to be looked at.
In any case, if your phone is still under warranty, contact the manufacturer.