DEV Community

Discussion on: How to install Flutter on macOS using homebrew and asdf

Collapse
 
mriecken profile image
Michael Riecken

I had an issue with sdkmanager and had to explicitly point to the Java 8 install directory by adding this line to the beginning of /usr/local/bin/sdkmanager

JAVA_HOME=/System/Volumes/Data/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

sdkmanager requires Java 8 (or some xml libraries properly linked). This should hook you up with Java 8 for the run of sdkmanager, but not set it universally through your mac.

Collapse
 
0xdonut profile image
Mr F.

didn't this work for you?

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)