the android create script errors out if JAVA_HOME is not set, and the script cannot derive it. But if the javac binary is resolvable (i.e. in the users PATH), then setting JAVA_HOME is unnecessary. Don't force users to set it.
Could not find JAVA_HOME. Try setting the environment variable manually