To get started I followed the instructions on the L Developer Preview site. That lead me through updating all of the required tools and packages and setting up the emulator. I created a new project in Android Studio and was able to select Android L Preview as the target but when it tried to build I got the following message:
Alright, so I'll just install JDK 7, right? I downloaded the jdk-7u60-macosx-x64.dmg installer from Oracle's site and tried to install it. That gave me this message:
It turns out that the test in the installer that checks for a supported OS fails in Yosemite. So I managed to find this blog post that ran me though these steps to fix that issue.
pkgutil --expand "/Volumes/JDK 7 Update 60/JDK 7 Update 60.pkg" "/tmp/JDK 7 Update 60.unpkg"
/tmp/JDK\ 7\ Update\ 60.unpkg
pkgutil --flatten "/tmp/JDK 7 Update 60.unpkg" "/tmp/JDK 7 Update 60.pkg"
open "/tmp/JDK 7 Update 60.pkg"
Ok, so now I double checked the Java version:
Perfect! I launched Android Studio again and saw the same error. That's ok, I probably just needed to set the path to the new JDK. So this time I clicked the link to the settings page and set the path to the JDK to
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home. This cleared up the error and finally let me push the test app to my Nexus 5!