The signing was first reported by the Miami Herald earlier this week.
Andersen, 38, is entering his 15th season in the league. He spent two years with James in Miami with the Heat, winning a championship in 2013.
Last year, Andersen began the season with the Heat but was traded after only seven games to the Memphis Grizzlies. Between the Heat and Grizzlies, Andersen averaged 3.9 points and 2.6 rebounds in 27 games.
Andersen has averaged 5.5 points, 5.1 rebounds and 1.4 blocks during his career.
On Jan. 25, 2006, Andersen received a two-year suspension for violating the league's anti-drug policy and missed the 2006-07 season and most of the next but was reinstated on March 4, 2008.
Andersen went undrafted and made his NBA debut on Nov. 23, 2001.