i posted this on another question. (you have done some of this)
This gets android working with unity … not sure about facebook
download the latest android studio. run and check the sdk manager check which sdk’s you have and install more if you want to build for a specific version.
java is included with it.
assuming windows …
I told unity about
sdk C:/Users/richp/AppData/Local/Android/Sdk
AND
jdk C:/Program Files/Android/Android Studio/jre
then
I needed to tell windows system environment variables about JAVA_HOME because unity calls a script in the sdk and it doesn’t know where to find java.
notice the backward slashes
C:\Program Files\Android\Android Studio\jre
from the search on the task bar type environment variables , then select the system one offered.