The easiest way to deal with a dog attack is to avoid it. Knowing the warning signs for a potential attack will give you time to take preemptive action.
Look for Stiffening and Watch the Whites of the Eyes
When a dog attack is about to occur, dogs generally display a few warning behaviors that you can observe and use to avoid the dog. While dogs don't always growl or show their teeth before an attack, they almost always get stiff, and sometimes the hair on the back of their neck or above their tail stands up. When a dog leans forward on stiff legs and with the neck and tail held stiffly, this is an aggressive posture that means the dog is ready to strike. If you can see the whites of the dog's eyes, the dog is severely agitated and may be about to attack.
Watch for Bared Teeth and Growling
Not all dogs give obvious warning signs, but some will bare their teeth or growl just before they attack. This is a warning behavior by the dog; if it doesn't get you to back off, the dog's next response will be to attack. If you see a dog showing teeth or hear a growl, back away slowly and disengage from the dog. Do not stare the dog directly in the eyes while you're backing away, as this could provoke it. Don't run away or make sudden movements, either, as this could encourage an attack.
Look for Signs of Stress
Dogs typically don't attack without warning. In most cases, dogs are sending subtle cues that signal distress before resorting to an attack. Some of these signs include yawning, licking the nose or panting without showing the tongue. Panting with the tongue hanging out is due to overheating, while panting with the tongue inside the mouth is an indicator of stress.
Some stressed dogs may also avoid eye contact or look away when confronted with an uncomfortable situation. They may even try to physically walk away from the uncomfortable stimuli. If a dog walks away, don't chase him; he may be trying to tell you that you're making him uncomfortable. If you don't listen, you could find yourself on the receiving end of a dog attack.
Learn to Spot Avoidant Behavior
Most dogs attempt to engage in other behaviors to avoid an outright attack. If a dog suddenly starts intently sniffing the ground or another object, settles down for a long scratch or seems abnormally interested in a familiar object, he may be agitated and on the verge of an attack. A dog may shake, bite at its paws or limbs or seem suddenly interested in grooming; all of these are an attempt to avoid your attention and minimize the stress the dog feels. Learn to heed these warning signs.
How to Respond to Warning Signs
Unless the dog is in imminent danger, get yourself and any other people or pets out of the area, giving the dog a chance to calm down. If the dog is indoors, getting everyone out of the house is a better course of action than locking the dog in a room, as confinement will only add to the dog's agitation.
It could take some time for the dog to settle down. If you can't wait that long, or if the dog is injured, ill or in harm's way, contact your local animal control officer immediately.
So you approached crate training with patience and persistence and it is still not working for you and your dog. Crate training is not for everyone and is definitely not for every dog. This does not mean that you have a "bad dog" or that there is something wrong with your dog.