Код: Выделить всё
ERROR: JAVA_HOME is set to an invalid directory: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Error: Gradle task assembleDebug failed with exit code 1
[img]https:// i.sstatic.net/3KLUTAjl.png[/img]
Выполняется:
Код: Выделить всё
zhelon@MacBook-Pro-M3-de-Sebastian-2 ~ % echo $JAVA_HOME
Код: Выделить всё
zhelon@MacBook-Pro-M3-de-Sebastian-2 ~ % which java
/usr/bin/java
Код: Выделить всё
zhelon@MacBook-Pro-M3-de-Sebastian-2 ~ % java -version
openjdk version "17.0.12" 2024-07-16
OpenJDK Runtime Environment Homebrew (build 17.0.12+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.12+0, mixed mode, sharing)
Это мой SDK для Android:
[img]https:/ /i.sstatic.net/vKlai8o7.png[/img]
.bash_profile
Код: Выделить всё
# export PATH=”/opt/homebrew/opt/openjdk@17/bin:$HOME/.jenv/bin:$PATH:/Users/zhelon/development/flutter/bin”
export PATH=”$PATH:/Users/zhelon/development/flutter/bin”
# export JAVA_HOME=`/usr/libexec/java_home -v 17`
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
Подробнее здесь: https://stackoverflow.com/questions/790 ... un-after-u
Мобильная версия