I'm using Arch Linux with Gnome.
I open Android Studio by the desktop item. The code editor works fine, the device manager starts correctly and the app run like a charm, but when I try to open the Device Monitor, I get this error:
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Monitor. No Java virtual machine was found after searching the following locations: /home/grams/Android/Sdk/tools/lib/monitor-x86_64/jre/bin/java java in your current PATH When i run the android studion from command line, the Device Monitor works.
Here is the .desktop content
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/home/grams/android-studio/bin/studio.png
Name[en_US]=Android Studio
Exec=/home/grams/android-studio/bin/studio.sh
Comment[en_US]=Android Studio IDE
Name=Android Studio
Comment=Android Studio IDE
Icon=/home/grams/android-studio/bin/studio.png
My JRE and JDK variables are being added on /etc/profile. When i run Android Studio on the command line, this error not occurs. Maybe it is a problem with Gnome launcher ?