In the episode, "Class Reunion," Andy reconnects with a previous girlfriend, Sharon. They broke up in high school. They were so good together, nobody--including Andy and Sharon--can remember at this date why they broke up.
But then they start talking. Andy is a small-town guy. He sees no need to move to a big city. He likes knowing his neighbors. He likes being part of a community. He doesn't want to be a detective or captain in something like the NYPD. (Barney is the same--but doesn't know it. Although Don Knotts left the show for contract reasons, his character's decision to move to the "big city" to work as a detective is entirely believable. However, I do think Barney would move back within a year.)
Sharon, on the other hand, loves the cosmopolitan lifestyle. She sees the small-town lifestyle as stagnant. She doesn't comprehend Andy's lack of ambition--she is ambitious herself. She wants to see more, do more. They reflect two solid viewpoints that can't connect. (Andy's later move away from Mayberry seems to be more about necessity than choice.)Since they are no longer in high school, they are able to acknowledge their differences and relax. But it's a great indicator that compatibility of temperament may not cross over into compatibility of goals and interests and mindsets.