The project is using an incompatible version (AGP 8.7.2) of the Android Gradle plugin. Latest supported version is AGP 8.5.0 See Android Studio & AGP compatibility options.
https://files.mastodon.social/media_attachments/files/113/432/870/621/474/777/original/f0f0d4c8927f24b8.png