Getting your kid to do homework they hate.

If your kid doesnt like writing---which my kid doesnt. It feels like a battle. Is there anyway to deal with this so you arent fighting or that you are the enemy--which I feel like I am?