Android Question

How to fix charging port on HTC will not charge
Knowing that it won't charge is not enough information to identify the precise cause of the problem. Even if it is not dust in the socket or a completely dead battery it could be the socket is broken, a bad connection to the motherboard or the failure of part of the changing circuit on the motherboard. So at one extreme you can fix it by blowing in the socket or using a soft brush (do not insert a rigid object into the socket!). At the other extreme you need a new motherboard. And as all we know is that your phone does not charge we do not have any way of telling which of these things it is.

So, try a different cable. Blow in the socket. Try a different battery if that is an option. And if you are sure it's not the cable, not some dirt, and not a dead battery (if user-replaceable), then get it repaired by someone who knows what they are doing.