Oleylammonium iodide (OAmI) is used as a perovskite precursor to fabricate various types of perovskite materials, including organic and inorganic perovskites; it significantly enhances the power conversion efficiency of perovskite films (exceeding 25%); improves photovoltaic performance by providing additional charge carriers through its halide ions; and enables the production of highly efficient and stable perovskite materials with superior photo-thermal stability for optoelectronic applications.