How to solve the problem of androgenic alopecia?

Lower androgens. Presuming you are male, androgenic alopecia, translated to male pattern hair loss, obviously is directly related to two things--genetics and testosterone (and its derivatives). Since you can't beat your genetics, lowering your testosterone does seem to help. Obviously this has side effects. Finasteride is the best studied medication used to treat this type of hair loss.
This is genetic. You inherit this from your mother's side of the family, and you have the baldness gene or you don't. You can wear a hair piece (expensive and requires constant maintanance), you can get a transplant (expensive and painful, and results vary), or you can shave your head, decide that low maintanance is the way to go, and be happy with what you've got and know that other things are more important.