A general approach to high-efficiency perovskite solar cells