Getting Android Studio Working On Mac OS X Yosemite

So, changing from a Windows development platform to a Mac OS X platform has been surprisingly smooth. While it has only been a few days, the only glitch I have encountered is when I started up Android Studio 1.0.1 for the first time.

Java Not Found Error from Android Studio
The “Java not found” error from Android Studio

 

tl;dr

Go and install this to fix it. Read on to find out why it happened.

 

Fixing Android Studio

Unfortunately, I got the dreaded “Java not found” error, which puzzled me because, of course I had already downloaded and installed JDKs 7 & 8, and verified that when I run the command “java -version” I saw the report that Java 7 was in use. A real head scratcher. So a few minutes of digging around brought me to this question on StackOverflow. Following the first link (the “Update”) brought me to the Android Tools Project site, which has a nice discussion about the BETA and Canary releases and issues with those versions along with the JDKs. The key areas I found to be the silver bullet for my issue was the commands:

The key command needed to temp fix the issue
A code snippet from the Android Tools Project Site

 

Once this command completed, I was in business and on my way! Unfortunately, this method only works when opening AS from a terminal window. I like things to work the way they are designed to work, so further research found more entries on StackOverflow and elsewhere about this issue but none really seemed to solve the real issue. After reading through a few more SO questions, articles, and support documents (along the way uninstalling Java and then reinstalling Java) I ended up back on the Android Tools Project site. Specifically the section titled “IDE JDK”, in this section is the fact that Android Studio defaults to running the IDE with JRE 6 because of font rendering. This page says that Android Studio will prompt you to install Java if it doesn’t find it, obviously not! A little trip over to the Apple support site to install Java 6 will fix things right up!

I hope this helps others the way it helped me, but is found faster than I found it!

Leave a comment

Your email address will not be published. Required fields are marked *