Many different conditions can cause a dog to lick compulsively, ranging from anxiety and a desire for attention to diseases of the adrenal, gastrointestinal, neurological or dental systems. The first step that a veterinarian takes to identify the correct malfunctioning bodily system in the dog is a total physical exam, as well as a thorough neurological screening.
Anxiety is one of the most common causes, as well as one that requires the least invasive forms of intervention from a veterinarian. When pets lack significant interaction with their owners and lack an adequate amount of exercise in their daily routines, anxiety is a result. Dogs carry out their frustration and worry by taking on compulsive behaviors, including appearing to lick everything in sight.
The diet of the dog is fodder for analysis as well, as nausea is also one of the most common causes for compulsive licking. Understanding how much a dog eats, what it eats and how often it eats are all a part of this equation. Adding too many treats and table scraps might make a dog much friendlier, but it can add stress to the digestive process that leads it to lick as a coping mechanism. The systemic causes are much rarer and require a much more invasive form of treatment.