I don't know why this version is not working, just change the version to lower that work
settings.gradle.kts
id("com.android.application") version "8.9.1" apply false
change to
id("com.android.application") version "8.7.0" apply false
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
change to
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip