With Android Studio v2.2, the DDMS is deprecated in favor of Android Device Monitor. But when I try to open the Monitor, it doesn't open citing that it is dependant on legacy Java SE 6 runtime which in missing in my Mac Os Sierra. This is crazy, isn't it?
I want to try mocking incoming SMS, phone calls to the emulator from the monitor. And this monitor doesn't work with jdk 7/8. What is the way out??
I am going to extend a bit more @karthiks's answer.
Probably you are in the situation where you have installed the latest version of the JDK, but you need JDK6 in order to use Android Device Monitor. The following steps allow you to keep your latest JDK as default, but define JDK6 for the directory where ADM is located.
$ brew install jenv
$ echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(jenv init -)"' >> ~/.bash_profile
.bash_profile
:$ source ~/.bash_profile
$ jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/
$ jenv add /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
$ cd ~/Library/Android/sdk/tools/
$ jenv local 1.6
I realised that the only way out of this is to install the legacy JDK6 in your mac. You can download it from Apple Support only.
You then have this worry of what happens to the latest JDK(/JRE) installed in your OS? The way I manage it is via JENV on command line.
Peace!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With