Every dog needs some exercise, but not all dogs need a significant amount. Some breeds have less tolerance for exercise as well as for heat because they have natural difficulty breathing; other dogs are simply smaller or less energetic. Whether you live in an apartment or you simply don't have the time for a long daily walk, you can find a breed whose lifestyle matches yours.
Brachycephalic breeds like bulldogs and pugs require relatively little exercise -- about 20 minutes of walking per day -- because they aren't very tolerant of the heat. Their short snouts belabor their breathing; their compact, stocky bodies make it harder for them to cope with hot weather. Summer exercise should be limited and, ideally, saved for the morning and evening.
Small breeds also frequently require less exercise -- not just because of their size, but because they have historically served as sedentary watchdogs. The Lhaso apso and the Tibetan spaniel, for example, originated as watchdogs who require only short daily walks before resuming their posts.
Even larger dogs like the Chinese Shar-Pei and the chow chow simply prefer to hang out at home, even when their energy levels are relatively high -- the chow chow, for example, has been historically bred as a sentry, so he is used to staying in one place instead of going for long walks. The Chinese Shar-Pei has similar breeding, and has an independent streak as well. If you're concerned about your dog maintaining healthy exercise habits, consult your veterinarian.