Android Studio “unable to find a valid JVM”

Today I needed the Android SDK to run an Ionic Framework app but didn’t have Java installed. Every time I tried to run Android Studio I was getting an error saying “Android Studio was unable to find a valid JVM.” After doing some perusing around the web I came across a post that said to add the following line:

export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk

This seemed to solve my problem and Android Studio is now running fine. One of the comments suggests running:

launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk

About Nick

Melbourne based web developer that loves building front-end systems with anything from vanilla JS to React. Infosec student and active learner. Subscribe to the blog

www ·

2 thoughts on “Android Studio “unable to find a valid JVM””

  1. Marcus Watson

    There is a typo. It is launchctl, not lauchctl

    1. You are definitely correct. That will teach me for ignoring spell check. Thanks.

Leave a Reply

Your email address will not be published.