In file build.gradle.kts (:app) in folder res change
compileSdk = 35 targetSdk = 34
Remember that the compileSdk you choose must be compatible with the API level of the virtual device