The codelab sample uses quite outdated versions of build tools (Gradle 7.0, AGP 7.0, etc). Apparently, you're trying to run it with a newer version of Gradle (8.9). You should either stick with the old version (i.e. use the gradle wrapper from the sample), or at least update the plugins, because the deprecations actually come from plugins, as you can see from the code locations provided.