adb: command not found

Java
export ANDROID_HOME=/Users/$USER/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools~/Library/Android/sdk/platform-tools/adb
Source

Also in Java: