Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

The docs claim a build.gradle 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 'com.android.tools.build:gradle:1.5.0' for the Android Plugin for Gradle and Gradle 2.5.

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

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

like image 934
CommonsWare Avatar asked Mar 10 '16 17:03

CommonsWare


People also ask

What is the project configuration in Visual Studio?

The project configuration determines what build settings and compiler options are used when you build the project. To create, select, modify, or delete a configuration, you can use the Configuration Manager. To open it, on the menu bar, choose Build > Configuration Manager, or just type Configuration in the search box.

What happens if a project configuration doesn't specify a platform?

If a project configuration doesn't specify a platform or specifies just one platform, then a solution configuration whose name matches that of the new project configuration is either found or added. The default name of this solution configuration does not include a platform name; it takes the form <project configuration name>.

What is a project target configuration and platform?

The configuration and platform that a project targets are used together to specify the build settings and compiler options to use when it's built. A project can have different settings for each combination of configuration and platform.

How do I change the default project configuration settings?

The default project configuration settings, defined in the Project Configuration Editor, are provided below. To access the Project Configuration Editor in Developer, right-click the project source and choose Project Configuration. Create or edit a description of the project. Click the Modify button to alter three different properties: 1. Security


1 Answers

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

  • Gradle 2.10
  • 'com.android.tools.build:gradle:2.1.0-alpha1' 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
    }
}
like image 110
CommonsWare Avatar answered Oct 11 '22 00:10

CommonsWare