From Wikipedia:
Return to Mayberry is a 1986 American made-for-television comedy film based on the 1960s sitcoms The Andy Griffith Show and, to an extent, Mayberry R.F.D. as well. The film premiered on April 13, 1986 on NBC, and was the highest-rated television film of 1986. Sixteen of the original cast members reunited for the film and its success could have led to additional Mayberry programs, but Andy Griffith was committed to Matlock for the 1986-87 season.
Most of the characters from the old series are revisited. The slightly milquetoast Howard Sprague (Jack Dodson), in an attempt to look younger, is seen in various hues of hair color. Gomer Pyle (Jim Nabors), having returned to civilian life following his stint in the Marines, shares filling-station duties with his cousin Goober (George Lindsey), and the pair are seen together for only the third time in the history of the franchise (after having previously only been shown together in the episode "Fun Girls" and an episode of Gomer Pyle, USMC). Howard Morris and Denver Pyle reprise the hillbilly roles of Ernest T. Bass and Briscoe Darling, respectively, along with Maggie Peterson and The Dillards as the rest of the Darling family. Otis Campbell (Hal Smith), the former town drunk, has become sober and now drives an ice cream truck.
Most of the surviving cast members of The Andy Griffith Show reprised their roles in the reunion movie. One notable exception was Frances Bavier, who played Aunt Bee for all eight seasons as well as two seasons of Mayberry R.F.D. Bavier had retired shortly after leaving R.F.D. in 1970. Her absence was explained by a scene in which Andy visits the cemetery where Aunt Bee is buried. (Bavier could not be in the movie due to illness, and she in fact did die three years later.) Elinor Donahue (as Ellie Walker) and Jack Burns (as Warren Ferguson) were two other cast members not to be involved in the movie. Some of the main R.F.D. regulars, including Sam Jones, son Mike, and Millie Swanson—all of whom were first introduced on the last season of The Andy Griffith Show itself—were also absent. (Ken Berry, who had played Jones, was forced to decline as he was busy playing Vinton Harper on Mama's Family.) Former series regulars Howard McNear (as Floyd Lawson), Hope Summers (as Clara Edwards), and Paul Hartman (as Emmett Clark) were all long deceased.
Also in the movie, Gomer and his longtime sweetheart LuAnn (Gomer Pyle, U.S.M.C.) had, implicitly, gone their separate ways, as Gomer was shown as being unattached in this TV movie. No explanation is given as to the end of Gomer's career in the U.S. Marine Corps, other than his civilian presence in Mayberry. Barney and Thelma Lou (Betty Lynn) finally married in the movie. In a 1966 episode Barney returned home to rekindle their relationship only to find out that Thelma Lou had married someone else. In the movie, it is briefly mentioned by Andy that Thelma Lou's first marriage had lasted only 18 months, although Barney quickly corrects him stating that they were only married 16 months. Regardless, their decades-long courtship finally ended in matrimony. There is also no mention of Andy and Helen having any children, although Griffith and Corsaut's final guest appearance in Mayberry R.F.D. was in the episode "Andy's New Baby".
Since the outdoor sets from the original series had long since been destroyed, the producers had to rebuild the "town" set from scratch. As a result, there were some differences between this version of Mayberry and the one from the TV series. One of the more notable differences was that the main street went past the courthouse rather than ending at the building, and that there was a small island with a flagpole on the street in front of the courthouse.
As Richie Cunningham did in Ron Howard's later series Happy Days, Ron Howard's Opie also had a brother who vanished without mention. Andy, Jr., christened on Mayberry R.F.D. in the episode "Andy's New Baby," apparently neither attended Barney's wedding nor was his name brought up during the course of this film.