this is a common problem actually with kindles and also other phones. one solution is to hold down the power button for 30 seconds while the charger is plugged in. turning it on this way. sometimes you can also do this while the phone is off of the charger. sometimes you have to power it on holding the power button and the volume either up or down button, different phone combination. I hope that this helps you out and that your phone starts charging
"This is because the m8 it's self has too much HTC JUNK IN IT , (dot view).( Mirror link) HTC clock) and so on , then there's google clock google weather HTC weather , and so on , could try this see if it works it did for a week with me , them bang of the wall.
1) power of device completely
2) press and hold volume down while pressing and releasing power button ,
3) Then down to recover using volume keys
Straight after pressing recovery option press and hold both volume up and power once you see the animation of red phone release only the power button ,
4) Then go down to clear catch ,
5) Finally reboot.
Once done this if not working , hook up to windows desktop computer sit back and let the computer check install drivers and scan device for faults , either using (windows recovery tool preferred) or iTunes"