I tried to open Android Device Monitor and the Studio showed me this message =-O :
It surprised me, because how have I been able to develop Android apps if I didn't have any Java installed?! Actually, Android Studio comes with bundled JDK/JRE (located in /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home
), but it is not found by the system: executed usr/libexec/java_home
gives
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Setting $JAVA_HOME
to /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home
did not help — source .bash_profile
doesn't like that it's a directory.
QUESTION: I don't want to install new JDK if I already have one inside Android Studio. How do I set it as system default?