How to set Java JDK path in Android Studio Arctic Fox, Bumblebee, etc.?
Asked Answered
D

2

9

How can I set the new path for Java JDK? I tried to change the environment variables but it did not work.

IDE: Android Studio Arctic Fox | 2020.3.1 Beta 4

IDE: Android Studio Bumblebee | 2021.1.1

Deyoung answered 24/6, 2021 at 17:36 Comment(0)
D
13
  1. Go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle
  2. Choose JDK folder for Gradle JDK field
  3. Apply changes

enter image description here

NB: If you haven't Java environment on your PC, go to https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html and download Java jdk for your platform.

NB2: It's JDK for your Gradle, not for your source code compiler (!)

Deyoung answered 24/6, 2021 at 17:36 Comment(5)
This is the Gradle JDK, not the JDK used by the IDEPaapanen
@Deyoung Kisel In my Arctic Fox I don't have this option, any solution? #69704789Mail
@Mail It seems that Gradle wasn't configured for your project. See Project structureDeyoung
It's always amazing how difficult to find this in the menu, I always need to rely on Stackoverflow to locate it.Teheran
For latest Android Studio (eg: Android Studio Flamingo | 2022.2.1), the Settings option can be found by going to Android Studio > SettingsHurlburt
G
1

Android Studio Bumblebee | 2021.1.1 Patch 1 has a fix for "Env variables not sourced when launched from Mac OS X to Monterey Dock" - See https://androidstudio.googleblog.com/2022/02/android-studio-bumblebee-202111-patch-1.html

Gunsel answered 7/2, 2022 at 13:10 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.