Why not just use Ubuntu as in the official guide?
Building Android 9 requires Python 3 in addition to Python 2 nowadays. While even the old Ubuntu versions recommended in the guide offer Python 3, they only have Python 3.5 or older, which lacks some features required by the build script. While you can install Python 3.6 or newer on Ubuntu (just compile it yourself), I then still ran into other issues (can't recall exactly what they were), but eventually decided that it was too much of a hassle and switched back to Arch Linux.
TL;DR Building on the recommended Ubuntu version is too complicated.