Charging is not supported with this Accessory
if you are facing this annoying situation with your iPhone 3gs or iPhone 4, you can try your luck fixing this annoyance with following few methods
1. Turn the brightness all the way up then plug your device an check
1-Plug in your charger.
2-When the message pops up “Charging is not supported with this accessory?” press dismiss and hold it.
3- while holding dismiss, unplug the charger from the iPhone not the wall , and put it back in
it should work now
Do a clean up.
1-try blowing in both end and the iPhone charging whole or how your call it.
2- if you have the wall charger the one were you have to connect usb to it and plug to wall try taking a tooth brash add perfume on it not a lot and brush the wall charger.
Insert USB cable partially. while inserting USB cable in the USB port of computer or laptop, insert it to the point where you can hear a beep, leave it at that point. it should start charging without giving you any errors.