The 28-year-old left Pompey by mutual consent after scoring five goals in 53 appearances during two seasons at Fratton Park.
“Andy is a player who I really liked in his Scunthorpe days and two years ago I tried desperately to sign him, but he was already close to putting pen to paper with Portsmouth,” Dons boss Neal Ardley told the club website.
“I have monitored him since then and he had a stop-start time there as he didn’t get a good enough run of games. That is not for me to worry about though.
“Andy can play on either wing or up front. He is exceptionally quick and is very good at taking players on. He will be given that licence by me. I am delighted because I have been chipping away at this one for a while.”