I download android open source project from Here
After downloaded, I used this command to clean UP etc...
$ make clobber
Then i got this problem
build/core/main.mk:42: ********************************************************************************
build/core/main.mk:43: * You are using version 4.1 of make.
build/core/main.mk:44: * Android can only be built by version 3.81.
build/core/main.mk:45: * see http://source.android.com/source/download.html
build/core/main.mk:46: ********************************************************************************
I got make 4.1 default from android open source project
I'm using ubuntu 18.04 LTS
Excepted solution
I know that hell of dependencies to build AOSP, I live on Arch Linux and working build may fail after a system update.
So now I'm using docker image with all deps preinstalled, without a need to upgrade system there, keeping my desktop Arch Linux independent.
Just some results after googling:
https://github.com/stucki/docker-lineageos (I used this one, but the next one may be a better choice)
https://github.com/jfloff/docker-lineageos
https://hub.docker.com/r/anthodingo/docker-lineageos/
Also you may be interested to know that there's a Linux distro dedicated to AOSP development: http://bbqlinux.org/