The University at Albany is buying a former student housing building at the shuttered College of Saint Rose for $12 million.