[!] Android toolchain - develop for Android devices (Android SDK 27.0.3) >>• Android SDK a ..\\Android\\sdk • Android NDK location not configured (optiona
I found this solution for having to use JDK 8 (you need an account to download now!) - use the embedded OpenJDK that comes with Android Studio:
Add this to your ~/.profile or similar:
# Use the JDK embedded with Android Studio for command-line builds
export JAVA_HOME='/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home'
Command-line builds via gradlew, and any other well-behaved script, will then use the version of the SDK that ships with Android Studio 2.2+.
*My Mac was still using the default Java 7.