A novel UV-resistant flexible perovskite solar cell integrates a CPI substrate and nanostructured TLS, enhancing efficiency and stability under UV exposure.