The first step in getting started with Android N as a developer is to install the preview release of Android Studio 2.1, which includes the Android N SDK. You can upgrade an existing Android Studio installation to the preview by setting the upgrade process to watch the Canary channel, then following all of the upgrade notifications. But if you’re actively developing Android apps, you might want instead to install Android Studio 2.1 side-by-side with your current version.
- [Voiceover] This short course is designed for Android developers who already know their way around Android Studio, and understand the basics of creating and deploying Android apps. If you're new to Android development, this course might still be interesting, but I don't recommend trying to follow along with all the steps that I'll describe, since I'll be assuming that basic knowledge. The first preview of Android Studio 2.1 was announced at this blog post on the Android Tools Project Site. You can find some basic information about the release here, but you can also click the link to get to the Android N Developer Preview page on the developer website.
And from there you'll find all sorts of interesting links, including information about new behavior changes, changes to the compilation process, sample apps, and more. The first step in getting started is to install Android Studio 2.1. If you already have Android Studio installed on your computer, you can upgrade the existing installation to the Preview. Set the upgrade process to watch the Canary channel and then follow all of the upgrade notifications.
But if you're actively developing Android apps, you might not want to do that. Instead, I recommend installing Android Studio 2.1 side-by-side with your current version. To download the most recent installers, go to this webpage, and then you can download versions for Windows, Mac, or Linux On OS Ten, you'll get a standard application package that you can drag to your applications folder. Before you do this, however, if you want to run side-by-side with an existing version, you should rename the new version or the old version.
On my Mac, I have three different versions of Android Studio currently installed. The one that I have set up without a version number is actually the late beta of Android Studio 2.0. I also have the stable version, Android Studio 1.5, and this is the Preview release of Android Studio 2.1. That's what I'll be demonstrating throughout this process. If you're working on Windows, you'll get a zip archive. It won't contain a standard MSI installer.
Instead, you can just extract the contents anywhere on your disk, and you'll have a completely separate copy of Android Studio available. Then to run it on Windows, you can execute either Studio.exe or Studio64.exe, depending on whether you're running 32- or 64-byte windows. Regardless of which version of Android Studio you use, you'll need Java 8 installed, and I just recommend using the latest version from Oracle, which you can get from java.oracle.com, and then from the homepage, clicking Java SE, then Download under JDK.
And then downloading the most recent version for your operating system. The first time you run Android Studio, you'll be asked where to install the Android SDK. If you have sufficient disk space, I recommend creating a separate SDK directory that you can maintain during the Preview and Beta process. On my Mac, I've created two different subdirectories under my Library directory, and my main production version is Android, and the Preview version is Android2.1.
And as a result, I have two completely separate copies of the SDK. My production version includes multiple API levels for all of the different projects I might be working on, while the Android2.1 version only includes the Android N SDK. By keeping completely separate installations, I'm ensuring that no unstable changes will accidentally make their way into my own apps unless that's what I want to happen. If you have any trouble installing Android Studio, go back to the Android N Developer Preview page and then take a look at the information at this link, the Android N for Developers preview.
This page also includes a lot of information about the new features, many of which I'll describe in this short course.