Error:
Checking build tools versions...
************************************************************
You are attempting to build with an unsupportedJDK.
You use OpenJDK but only Sun/Oracle JDK issupported.
Please follow the machine setup instructions at
https://source.android.com/source/download.html
************************************************************
build/core/main.mk:152: *** stop. Stop.
Solution:
Choose your new version using the following command:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws