There appears to be a bug in the standard JDK that can prevent the Mac menu bar from functioning. This only affects a debuggable version of IntelliJ or Android Studio launched from IntelliJ. Commands invoked from the menu bar do nothing, although the same command invoked via a key binding works as expected.
There are two work-arounds. The simplest is to edit the run config used to launch the product under test. In the VM options, change -Dapple.laf.useScreenMenuBar=true
to -Dapple.laf.useScreenMenuBar=false
. That puts the menu bar in the window, rather than at the top of the screen.
The other solution is to use a different JDK. Jetbrains has one that can be used. Clone it from https://github.com/JetBrains/jdk8u. Or you can use the JRE distributed with IntelliJ IDEA Ultimate. It is in the application installation folder: <intellij>/Contents/JDK/Contents/Home/jre
. You'll need to copy tools.jar
from .../Home/lib
into .../Home/jre/lib
. You also need to edit the run config to disable the JRE check. In VM options change -Didea.jre.check=true to -Didea.jre.check=false. To make the run config use the alternate JDK edit it and change JRE to point to the new location. It will be something like /Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home/jre or where ever you downloaded the github repo.