If you want to add a new version of yarn, first create a directory with the revision number as the name (without the v prefix), and download from https://github.com/yarnpkg/yarn/releases/ the following:
Next, rename both files by removing the v
character before the revision. e.g. yarn-v1.22.17.tar.gz -> yarn-1.22.17.tar.gz. This is to avoid running into this issue
Finally, update the YarnRootExtension::version
field in buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
to the version you downloaded.