After upgrading to IntelliJ IDEA 2023.2, my Gradle...
# intellij
j
After upgrading to IntelliJ IDEA 2023.2, my Gradle JVM setting got messed up. This is the second time I've seen this. It might have happened after upgrading to 2023.1 last time. My selected setting
jbr-17
, which used to point to JetBrains Runtime version 17, now points to JDK 1.8 (which causes Gradle sync error, since AGP needs JDK 11). I can select the correct JDK to fix it (and there's another screen I eventually found to delete the broken reference). But figured I'd report this and see if anyone else has encountered this error.
c
Perhaps the jbr one is pointing to the bundled JBR with IntelliJ, which would be shifted on upgrade?
j
Hmm, maybe. I'd think it would handle pointing it to the correct location if moved. And odd it decides to point it to JDK 1.8, which is installed for the system, where jbr-17 is user installed. I do have 5 jbr-17.0.7 JDKs, which you can see listed in the screenshot.
And the "embedded JDK" is 11.0.12. jbr-17 I downloaded myself, if I recall.
c
Two potential problems here: • Using the built-in JBR; IntelliJ shouldn’t permit that, it’s fragile - tied to IntelliJ upgrade with is separate from use of that JBR. Install JBR as with any other JVM installation; • Redirecting the reference on broken linkage; looks like it’s picking the “first one in the list” instead of just erroring out.
j
JDK 1.8 does seem to be the first one in the list. But I'm pretty sure I downloaded jbr-17 myself. And the install didn't go anywhere with the IntelliJ upgrade, as it and 4 other versions are still there in the same location.
I upgrade jbr-17 from time to time when IntelliJ notifies me.
c
understood. sounds like a bug, IJ shouldn’t mess with your defined JVMs.
I have not seen this myself; have several JVMs installed (none are JBR), on upgrade everything is as it was.
👍🏼 1
j
I'm still trying to find that settings screen I eventually ran into last time this happened to manage the JDK versions.
Looks like I can change the JDK home path for jbr-17 from Project Structure -> Platform Settings -> SDKs.
c
ah yea, seeing that. Other than adding JDKs have never really had to configure them.
j
The other thing I noticed after upgrade was all my open projects were closed, which I've usually found to mean something with the .idea project settings requires the project to be re-imported. Like I'll see this after opening a project in an EAP version of IntelliJ or Android Studio and then opening the old version of the IDE, which had it open, afterwards. Odd for it to happen after upgrading to a newer IDE version.
c
odd indeed. Did the 2023.2 upgrade this morning, no issues, it opened straight up with existing projects. I’m not using Android Studio though, which I understand to be quite a thing ontop of IntelliJ.
j
I mostly use IntelliJ for my KMP projects. But sometimes jump to Android Studio for Android-specific things, or if a project uses a newer AGP version that IntelliJ doesn't yet support. Many of my projects have been opened in both IDEs at some point.
m
Could you please create a ticket so we can look into it?
👍🏼 1