CommonsWare CommonsWare -5 years ago 359
Android Question

What Is the Proper Project Configuration for the N Developer Preview?

The docs claim a

like this works:

android {
compileSdkVersion 'android-N'
buildToolsVersion 24.0.0

defaultConfig {
minSdkVersion 'N'
targetSdkVersion 'N'

That gives me
failed to find Build Tools revision 24.0.0
, when using
for the Android Plugin for Gradle and Gradle 2.5.

If I look in
in my Android SDK installation, I see
, not
. However, if I switch my
to use
buildToolsVersion "24.0.0-preview"
, I get
Invalid revision: 24.0.0-preview

So, what combination of
values works to build a project to compile against the N Developer Preview SDK?

Answer Source

Based on one of the sample apps, I am now using:

  • Gradle 2.10
  • '' for the Android Plugin for Gradle (goes in your top-level build.gradle file)
  • buildToolsVersion "24.0.0 rc1"

This seems to be holding up, including with Android Studio 1.5.1.

UPDATE: Now that N Developer Preview 4 has been released, we can start using 24 in place of "N" and "android-N":

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        minSdkVersion 24
        targetSdkVersion 24
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download