Hey everyone can I double check that I am understa...
# android-studio
m
Hey everyone can I double check that I am understanding this correctly (I'm probably not). • I have
JAVA_HOME
set to
/usr/lib/jvm/temurin-21-jdk-amd64
. • My terminal shows this as does the terminal within AS. • However when I go to
File | Settings | Build, Execution, Deployment | Build Tools | Gradle
JAVA_HOME
is set to the
jbr
from the Toolbox installation. • It's the same value as `GRADLE_LOCAL_JAVA_HOME`: the
jbr
version. Is that correct? And why isn't AS reading my
JAVA_HOME
environment variable correctly? I'm on Ubuntu 24.04, have installed Eclipse Temurin 21 JDK, and am running Android Studio Meerkat Feature Drop | 2024.3.2 Canary 5.
k
Where are you setting JAVA_HOME? .zprofile or .bash_profile should be picked up correctly by Android Studio
c
make sure this is also set correctly. mine was correct by default.
m
Thanks @Colton Idle, mine was set to
/bin/bash
rather than
/usr/bin/bash
(which is what
which bash
reports on my system). However changing this didn't help sad panda .
Where are you setting JAVA_HOME? .zprofile or .bash_profile should be picked up correctly by Android Studio
@kaeawc I'm setting this in
.bashrc
which should be read by
.profile
on login for me - I'm running Ubuntu Linux. However, interestingly I don't have a
.bash_profile
file.
I've raised a bug, let's see what the team says: https://issuetracker.google.com/issues/397903877
c
I also raised a bug on this a while back (like 3 years ago) in intellij i believe. one thing that also helped was that restarting intellij wasn't enough. i had to also kill and restart jetbrains toolbox because it has something to do with intialization as well
👍 1
this might also help https://github.com/mdogan/homebrew-zulu/issues/16 apparently theres like some built in command for java home or something. i never understood it. lol
m
i had to also kill and restart jetbrains toolbox because it has something to do with intialization as well
I've restarted my whole machine multiple times. Would that be enough?
c
restarting your machine should be enough. yeah