Friday, June 30, 2017

Android Studio 3.0 Canary 5 is now available

We have released Android Studio 3.0 Canary 5 to the Canary and Dev Channels. This release includes a few improvements and fixes a variety of bugs, such as the following:


Changes

  • The flavorSelection property has moved to the ProductFlavor class. This means that you can choose the default variant your app consumes from a producer at the flavor level. Add this property to android.defaultConfig to apply it to all flavors:
    android {
     defaultConfig {
       flavorSelection 'shape', 'square'
     }
    }

    To learn more, read the plugin 3.0.0 migration guide.

  • Specifying PNG crunching is now a BuildType property and is disabled by default on debug builds:
    android {
       …
       buildTypes {
           release {
               crunchPngs true
           }
       }
    }

  • Android Gradle plugin is now based on Gradle 4.1 milestone 1. To update your project manually, add the following to your gradle-wrapper.properties file:
    distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip

Known Issues

  • Instant app deployment fails the first time on API levels 24 and 25. When you are deploying your instant app from Android Studio to device or emulator image running Nougat, the deployment may fail the first time. The workaround for this issue is to click the Stop action and then click the Run button again.
  • Reliability issue with instant app provisioning cache. If you manually unprovision your device or emulator image for instant app development, and then deploy the instant app from Android Studio, the deployment will fail because Android Studio will not provision your device/emulator image again. To workaround for this issue:
    1. Go into the Run Configuration dialog and select the instantapp module on the left-hand pane.
    2. Click the “Instant App Provision” task under “Before launch:Gradle-aware Make, Instant App Provision”
    3. Click the edit (the pencil icon)
    4. Check “Clear provisioned devices cache”

  • AAPT2. We are continuing to stabilize AAPT2 which enables incremental resource processing. If your build fails due to resource processing issue, please send us a bug report. To temporarily disable AAPT, set android.enableAapt2=false in your gradle.properties file.
    1. Roboelectric is currently not compatible with AAPT2