Tag Archives: release

Android Studio 4.1

Posted by Scott Swarthout, Product Manager

Android Studio logo

Today, we’re excited to release the stable version of Android Studio 4.1, with a set of features addressing common editing, debugging, and optimization use cases. A major theme for this release was helping you be more productive while using Android Jetpack libraries, Android’s suite of libraries to help developers follow best practices and write code faster. Based on your feedback we made a number of improvements to the code editing experience with IDE integrations for popular Android libraries.

Some highlights of Android Studio 4.1 include a new Database Inspector for querying your app’s database, support for navigating projects that use Dagger or Hilt for dependency injection, and better support for on-device machine learning with support for TensorFlow Lite models in Android projects. We’ve also made updates to Apply Changes to make deployment faster. Based on your feedback, we’ve made several changes to help game developers with a new native memory profiler and standalone profiling tools.

Product quality continues to be a major focus for the team, and we’ve been hard at work tracking down bugs and performance issues. We’ve heard from many developers that they liked the focus on better performance and reliability, so we’re happy to report that during this release cycle we’ve fixed 2,370 bugs and closed 275 public issues. We stay committed to maintaining high quality since we know that is key to your developer productivity.

Thank you to those who gave your early feedback in preview releases. Your feedback helped us iterate and improve features in Android Studio 4.1. If you are ready for the next stable release, and want to use a new set of productivity features, Android Studio 4.1 is ready to download for you to get started.

Below is a full list of new features in Android Studio 4.1, organized by key developer flows.

Design

Material Design Components updates

Android Studio templates in the create New Project dialog now use Material Design Components (MDC) and conform to updated guidance for themes and styles by default. These changes will make it easier to use recommended material styling patterns and support modern UI features like dark themes.

Material Design Components updates

Material Design Components updates in Project Templates

Updates include:

  • MDC: Projects depend on com.google.android.material:material in build.gradle. Base app themes use Theme.MaterialComponents.* parents and override updated MDC color and “on” attributes.
  • Color resources: Color resources in colors.xml use literal names (for example, purple_500 instead of colorPrimary).
  • Theme resources: Theme resources are in themes.xml (instead of styles.xml) and use Theme.<ApplicationName> names.
  • Dark theme: Base application themes use DayNight parents and are split between res/values and res/values-night.
  • Theme attributes: Color resources are referenced as theme attributes (for example, ?attr/colorPrimary) in layouts and styles to avoid hard-coded colors.

Develop

Database Inspector

We wanted to make it easier to inspect, query, and modify your app's databases using the new Database Inspector. To get started, deploy your app to a device running API level 26 or higher and select View > Tool Windows > Database Inspector from the menu bar. Whether your app uses the Jetpack Room library or the Android platform version of SQLite directly, you can now easily inspect databases and tables in your running app or run custom queries.

Because Android Studio maintains a live connection while you’re inspecting your app, you can also modify values using the Database Inspector and see those changes in your running app. If you use the Room persistence library, Android Studio also places run buttons next to each query in the code editor to help you quickly run queries you define in your @Query annotations. Learn more

Database inspector

Inspect, query, and modify your app’s databases with the Database Inspector

Run Android Emulator directly in Android Studio

You can now run the Android Emulator directly in Android Studio. Use this feature to conserve screen real estate, to navigate quickly between the emulator and the editor window using hotkeys, and to organize your IDE and emulator workflow in a single application window. You can manage snapshots and common emulator actions like rotating and taking screenshots from within Studio, but access to the full set of options still requires running the stable emulator. You can opt-in to use this feature by going to File → SettingsToolsEmulator Launch in Tool Window.

Android Emulator in Android Studio

Run the Android Emulator inside of Android Studio

Dagger Navigation Support

Dagger is a popular library for dependency injection on Android. Android Studio makes it easier to navigate between your Dagger-related code by providing new gutter actions and extending support in the Find Usages window. For example, clicking on the go to producer gutter action gutter action next to a method that consumes a given type navigates you to the provider of that type. Conversely, clicking on the go to consumer gutter action gutter action navigates you to where a type is used as a dependency. Android Studio also supports navigation actions for dependencies defined with the Jetpack Hilt library. Learn more.

Gutter actions navigation in Android Studio

Navigate between Dagger-related code with gutter actions

Use TensorFlow Lite models

Android developers are using machine learning to create innovative and helpful experiences. TensorFlow Lite is a popular library for writing mobile machine learning models, and we wanted to make it easier to import these models into Android apps. Similar to view binding, Android Studio generates easy-to-use classes so you can run your model with less code and better type safety. The current implementation of ML Model Binding supports image classification and style transfer models, provided they are enhanced with metadata.

To see the details for an imported model and get instructions on how to use it in your app, double-click the .tflite model file in your project to open the model viewer page. Learn more.

TensorFlow Lite in Android Studio 4.1

View TensorFlow Lite model metadata in Android Studio 4.1

Build & Test

Android Emulator - Foldable Hinge Support

Android Studio

In addition to recently adding 5G cellular testing support, we’ve added support for foldables in the Android emulator. With Android emulator 30.0.26 and above, you can configure foldable devices with a variety of fold designs and configurations. When a foldable device is configured, the emulator will publish hinge angle sensor updates and posture changes, so you can test how your app responds to these form factors. See the Developing for Android 11 with the Android Emulator blogpost to read more.

Extended controls, device pose

Apply Changes updates

Faster builds help developers make changes to their app more easily and quickly. To help you be more productive as you iterate on your app, we've made multiple enhancements to Apply Changes for devices running Android 11 or higher.

We've invested heavily in optimizing your iteration speed by developing a method to deploy and persist changes on a device without installing the application. After an initial deploy, subsequent deploys to Android 11 devices using either Apply Code Changes or Apply Changes and Restart Activity are now significantly faster. We’ve also added support for additional code changes in Apply Changes. Now if you add a method, you can deploy those changes to a running app by clicking either Apply Code Changes or Apply Changes and Restart Activity.

Export C/C++ dependencies from AARs

Android Gradle Plugin 4.0 added the ability to import Prefab packages in AAR dependencies. We wanted to extend the capability of this feature to support sharing native libraries as well. AGP version 4.1 enables exporting libraries from your external native build in an AAR for an Android Library project. To export your native libraries, add the following to the android block of your library project's build.gradle file:

buildFeatures {
    prefabPublishing true
}

prefab {
    mylibrary {
      headers "src/main/cpp/mylibrary/include"
    }

    myotherlibrary {
        headers "src/main/cpp/myotherlibrary/include"
    }
}

Symbolication for native crash reports

When a crash or ANR occurs in native code, the system produces a stack trace, which is a snapshot of the sequence of nested functions called in your program up to the moment it crashed. These snapshots can help you to identify and fix any problems in the source, but they must first be symbolicated to translate the machine addresses back into human-readable function names.

If your app or game is developed using native code, like C++, you can now upload debug symbols files to the Play Console for each version of your app. The Play Console uses these debug symbols files to symbolicate your app's stack traces, making it easier to analyze crashes and ANRs. To include debug symbols in your app bundle, add the following line to your project’s build.gradle file:

android.buildTypes.release.ndk.debugSymbolLevel = 'SYMBOL_TABLE'

Optimize

System Trace UI improvements

In Android Studio 4.1 we’ve overhauled System Trace, an optimization tool that gives you a real-time look at how your app is using system resources. We made it easier to select a trace with box selection mode, added a new analysis tab, and added more frame rendering data to help you investigate rendering issues in your app’s UI. Learn more.

Box selection: In the Threads section, you can now drag your mouse to perform a box selection of a rectangular area, which you can zoom into by clicking the Zoom to Selection button on the top right (or use the M keyboard shortcut). When you drag and drop similar threads next to each other, you can select across multiple threads to inspect all of them at once.

Use box selection to more easily select traces.

Trace selection

Summary tab: The new Summary tab in the Analysis panel displays:

  • Aggregate statistics for all occurrences of a specific event, such as an occurrence count and min/max duration.
  • Trace event statistics for the selected occurrence.
  • Data about thread state distribution.
  • Longest-running occurrences of the selected trace event.
View aggregated statistics in Summary tab of Android Studio 4.1

View aggregated statistics in the Summary tab

Display data: In the Display section, new timelines for SurfaceFlinger and VSYNC help you investigate rendering issues in your app's UI.

Standalone profilers

It's now possible to access the Android Studio Profilers in a separate window from the primary Android Studio window. This is useful when optimizing Android games built with other tools like Unity or Visual Studio.

To run the standalone profilers, do the following:

  1. Make sure the profilers in Android Studio are not already running on your system.
  2. Go to the installation directory and navigate to the bin directory:

Windows/Linux: <studio-installation-folder>\bin

macOS: <studio-installation-folder>/Contents/bin

  1. Depending on your OS, run profiler.exe or profiler.sh

The standalone profiler will allow you to connect to the Android emulator or any connected devices.

Standalone Android Studio profiler

Optimize your app with the Standalone Android Studio Profilers

Native Memory Profiler

Tracking native memory usage is important for game developers and other developers using C++ to understand how to optimize their app’s memory consumption. The Android Studio Memory Profiler now includes a Native Memory Profiler for apps deployed to physical devices running Android 10 or later. The Native Memory Profiler tracks allocations/deallocations of objects in native code for a specific time period and provides information about total allocations and remaining system heap size.

To initiate a recording, click Record native allocations at the top of the Memory Profiler window:

Native Memory Profiler window in Android Studio 4.1

View native memory allocations with the Native Memory Profiler

To recap, Android Studio 4.1 includes these new enhancements & features:

Design

  • Material Design Components updates

Develop

  • Database Inspector
  • Run Android Emulator directly in Android Studio
  • Dagger navigation support
  • Use TensorFlow Lite models

Build & Test

  • Android Emulator - Foldable Hinge Support
  • Apply Changes updates
  • Export C/C++ dependencies from AARs
  • Symbolification for native crash reports

Optimize

  • System Trace UI Improvements
  • Standalone profilers
  • Native Memory Profiler

These materials are not sponsored by or affiliated with Unity Technologies or its affiliates. “Unity” is a trademark or registered trademark of Unity Technologies or its affiliates in the U.S. and elsewhere.

Announcing the Google Ads API is out of beta

We are excited to announce that the Google Ads API is now generally available. This means you can use the Google Ads API for your production applications with confidence that prior performance issues have all been addressed. Batch processing is now available to everyone.

The AdWords API will continue to be supported. We will announce a deprecation schedule at a later date. We will continue to add more features in upcoming releases to reach full parity with the AdWords API.

Where can I learn more?
Get started with the following resources: If you have any questions or need additional help, contact us via the forum or at [email protected].

Announcing AdMob API v1 General Availability

Today we’re excited to announce the general availability v1 release of the new AdMob API. It allows publishers to programmatically get information on their AdMob account.

The AdMob API v1 release offers the following benefits for app developers compared with the existing AdSense API used to access AdMob data:

  • Retrieve metrics that are consistent with how the AdMob UI defines and calculates them
  • Retrieve mediation reports previously not available through the AdSense API

How can I get started?

The AdMob API is now available to all AdMob users. You can use the Getting Started guide and the client libraries to get started.

If you’re already working with the AdSense API, please refer to our migration guide to get started. Please make plans to migrate to the new AdMob API, as we will sunset access to AdMob data via the AdSense API in the fall of 2021.

If you have any questions, please contact us via the AdMob API Developer Forum. We will be able to provide suggestions on how to best migrate your workflow. We look forward to hearing your feedback.

Announcing v5 of the Google Ads API beta

Today, we’re announcing the v5 release of the Google Ads API beta. To use the v5 features, you will need to upgrade your client libraries and client code. The updated client libraries and code examples will be published next week. For more information on breaking changes, see the migration guide.

Here are the highlights:
  • Return metrics for entities not formally supported in the API, such as Discovery campaigns, are now available. These entities will show UNKNOWN enum values returned. See the release notes for more details.
  • New request parameter to opt into returning all mutable fields in the response during a mutate.
  • The API is moving towards using field presence such as optional string and optional double instead of wrapper types such as StringValue and DoubleValue. Your code will be easier to use and simplifies the API with payloads that are significantly smaller. Approximately half of our resources have been updated in this release. The full list is in the migration guide, and our code examples have been updated. The rest of the resources will change to field presence in a future release.
  • Subfields of AdGroupAd.policy_summary are now selectable. Non-repeated subfields of AdGroupAd.policy_summary are now filterable.
  • Support for Keyword Planner:
Where can I learn more?
The following resources can help you get started: If you have any questions or need additional help, contact us via the forum.

Announcing v202008 of the Google Ad Manager API

We're happy to announce that v202008 of the Google Ad Manager API is available starting today. Upgrade to this version to take advantage of new functionality, like support for Audio Ads and the ability to specify multiple Viewability Provider Companies on a LineItem.

If you work with video ads, there are several new useful features available to you in v202008:
  • We’ve added nielsenCtvPacingType for specifying the pacing computation method for impressions on connected devices for a Nielsen measured LineItem.
  • You can now call the performCmsMetadataKeyAction to activate and deactivate CmsMetadataKeys.
For the full list of changes for v202008 and all other active API versions, check the release notes. Feel free to reach out to us on the Ad Manager API forum with any API-related questions.

Announcing v4 of the Google Ads API beta

Today, we’re announcing the v4 release of the Google Ads API beta. To use the v4 features, update your client library. If you are upgrading from v1, v2, or v3, some of your code may require changes when you switch to the new v4 endpoint. For more information on breaking changes, see the migration guide. If you are using v1, upgrade by July 29, 2020.

Here are the highlights:
  • Local campaigns. Local campaigns streamline the process for you, making it easy to promote your stores across Google’s largest properties including the Google Search Network, Maps, YouTube, and the Google Display Network.
  • Support for retrieving and reporting on Smart campaigns.
  • Support for account-level optimization score.
  • Keyword Planning. See the Planning section in the release notes for details.
  • Linking third party app analytics accounts to Google Ads accounts. See the Account Management section in the release notes for details.
Where can I learn more?
The following resources can help you get going with the Google Ads API: The updated client libraries and code examples will be published next week. If you have any questions or need additional help, contact us via the forum.

Announcing v4 of the Google Ads API beta

Today, we’re announcing the v4 release of the Google Ads API beta. To use the v4 features, update your client library. If you are upgrading from v1, v2, or v3, some of your code may require changes when you switch to the new v4 endpoint. For more information on breaking changes, see the migration guide. If you are using v1, upgrade by July 29, 2020.

Here are the highlights:
  • Local campaigns. Local campaigns streamline the process for you, making it easy to promote your stores across Google’s largest properties including the Google Search Network, Maps, YouTube, and the Google Display Network.
  • Support for retrieving and reporting on Smart campaigns.
  • Support for account-level optimization score.
  • Keyword Planning. See the Planning section in the release notes for details.
  • Linking third party app analytics accounts to Google Ads accounts. See the Account Management section in the release notes for details.
Where can I learn more?
The following resources can help you get going with the Google Ads API: The updated client libraries and code examples will be published next week. If you have any questions or need additional help, contact us via the forum.

Announcing Authorized Buyers’ new Real-Time Bidding API

Today we are pleased to announce the release of Authorized Buyers’ Real-Time Bidding API. In addition, we are also announcing that all versions of the Ad Exchange Buyer API are now deprecated, and will sunset by the end of Q1, 2021. With the exception of the Budgets resource that is not being carried over to the new API, we recommend migrating to the Real-Time Bidding API’s equivalent resources well before the sunset to avoid interruptions to your integration. Note that this deprecation does not include the Ad Exchange Buyer II API, which will continue to be supported.

The Real-Time Bidding API currently includes resources for managing creatives and user lists, and will be expanded in Q3 to include resources for managing pretargeting. Additional updates through Q3 and Q4 will add features for managing accounts and billing information, and retrieving performance reports. We recommend reading through the migration guide—which will be updated as new features are added to the Real-Time Bidding API—to learn more about getting started with the new API.

Feel free to reach out to us via the Authorized Buyers API forums if you have questions or feedback concerning the Real-Time Bidding API.

Mark Saniscalchi, Authorized Buyers Developer Relations

Android Studio 4.0

Posted by Adarsh Fernando, Product Manager

Android Studio logo

During these uncertain times, we’re humbled by the many developers around the world who are finding ways to keep doing what they do best—create amazing apps for Android. Whether you’re working from your kitchen table on a laptop or from a home office, you need tools that keep up with you. Android Studio 4.0 is the result of our drive to bring you new and improved tools for coding smarter, building faster, and designing the apps your users depend on, and it’s now available on the stable channel.

Some highlights of Android Studio 4.0 include a new Motion Editor to help bring your apps to life, a Build Analyzer to investigate causes for slower build times, and Java 8 language APIs you can use regardless of your app’s minimum API level. Based on your feedback, we’ve also overhauled the CPU Profiler user interface to provide a more intuitive workflow and easier side-by-side analysis of thread activity. And the improved Layout Inspector now provides live data of your app’s UI, so you can easily debug exactly what’s being shown on the device.

As always, this release wouldn’t be possible without the early feedback from our Preview users. So read on or watch below for further highlights and new features you can find in this stable version. If you’re ready to jump in and see for yourself, head over to the official website to download Android Studio 4.0 now.



Design

Motion Editor

The MotionLayout API extends the rich capabilities of ConstraintLayout to help Android developers manage complex motion and widget animation in their apps. In Android Studio 4.0, using this API is made easier with the new Motion Editor—a powerful interface for creating, editing, and previewing MotionLayout animations. You no longer have to create and modify complex XML files; the Motion Editor generates them for you, with support for editing constraint sets, transitions, keyframes, and view attributes. And if you do want to see the code the editor creates, it is one click away. And just as conveniently, for developers already using ConstraintLayout, the IDE can easily convert those to MotionLayout. Learn more

Create, edit, and preview animations in the Motion Editor

Create, edit, and preview animations in the Motion Editor

Upgraded Layout Inspector

Have you ever wanted to investigate where a value for a particular attribute came from? Or see a live 3D representation of nested views to more easily inspect your view hierarchy? With the new Layout Inspector, debugging your UI is much more intuitive by giving you access to data that stays updated with your running app and providing insights on how resources are being resolved.

Debug your app’s UI in real-time with Live Layout Inspector

Debug your app’s UI in real-time with Live Layout Inspector

Use the live Layout Inspector by selecting View > Tool Windows > Layout Inspector from the main menu. If you are deploying to a device running API 29 level or higher, you have access to additional features, such as a dynamic layout hierarchy that updates as views change, detailed view attributes that also help you determine how resource values are resolved, and a live 3D model of your running app’s UI. Navigate, animate, and transition between views on your running app while always having the ability to debug your UI to pixel perfection. Learn more

Layout Validation

Compare your UI across multiple screens with Layout Validation

Compare your UI across multiple screens with Layout Validation

When you’re developing for multiple form-factors, screen sizes, and resolutions, you need to verify that changes you make to your UI look great on every screen you support. With the Layout Validation window, you can preview layouts on different screens and configurations simultaneously, so you can easily ensure your app looks great across a range of devices. To get started, click on the Layout Validation tab in the top-right corner of the IDE.

Develop & Profile

CPU Profiler UI Upgrades

The improved UI of the CPU Profiler

The improved UI of the CPU Profiler

The CPU profiler is designed to provide a rich amount of information about your app’s thread activity and trace recordings. So, when you provided us feedback about how we can make the UI even more intuitive to navigate and the data easier to understand, we listened. In Android Studio 4.0, CPU recordings are now separated from the main profiler timeline and organized in groups to allow for easier analysis. You can move groups up and down, or drag-and-drop individual items within a group for additional customization.

Easier side-by-side analysis of thread activity

Easier side-by-side analysis of thread activity

For easier side-by-side analysis, you can now view all thread activity in the Thread Activity timeline (including methods, functions, and events) and try new navigation shortcuts to easily move around the data—such as using W, A, S, and D keys for fine-grained zooming and panning. We’ve also redesigned the System Trace UI so Events are uniquely colored for better visual distinction, threads are sorted to surface the busier ones first, and you can now focus on seeing data for only the threads you select. Finally, we invested in the quality of the CPU profiler, and consequently we’ve seen a significant decrease in the user-reported error rates of recordings since Android Studio 3.6. There are even more improvements to try, so learn more.

Smart editor features when writing rules for code shrinking

Smart editor feature when writing rules for R8

Smart editor feature when writing rules for R8

R8 was introduced in Android Gradle plugin 3.4.0 to combine desugaring, shrinking, obfuscating, optimizing, and dexing all in one step—resulting in noticeable build performance improvements. When creating rules files for R8, Android Studio now provides smart editor features, such as syntax highlighting, completion, and error checking. The editor also integrates with your Android project to provide full symbol completion for all classes, methods, and fields, and includes quick navigation and refactoring.

IntelliJ IDEA 2019.3 platform update

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA 2019.3 and 2019.3.3 releases. These improvements largely focus on quality and performance improvements across the IDE.

Kotlin Android live templates

Live templates is a convenient IntelliJ feature that allows you to insert common constructs into your code by typing simple keywords. Android Studio now includes Android-specific live templates for your Kotlin code. For example, simply type toast and press the Tab key to quickly insert boilerplate code for a Toast. For a full list of available live templates, navigate to Editor > Live Templates in the Settings (or Preferences) dialog.

Clangd support for C++

For developers writing C++, we have switched to clangd as the primary language analysis engine for code navigation, completion, inspection, and showing code errors and warnings. We also now bundle clang-tidy with Android Studio. To configure Clangd or Clang-Tidy behavior, go to the IDE Settings (or Preferences) dialog, navigate to Languages & Frameworks > C/C++ > Clangd or Clang-Tidy, and configure the options.

Build

Android Gradle plugin 4.0.0 includes support for Android Studio’s Build Analyzer by using Java 8 language APIs (regardless of your app’s minimum API level), and creating feature-on-feature dependencies between Dynamic Feature modules. For a full list of updates, read the Android Gradle plugin 4.0.0 release notes.

Build Analyzer

Address bottlenecks in your build performance with Build Analyzer

Address bottlenecks in your build performance with Build Analyzer

Android Developers rely on a variety of Gradle plugins and custom build logic to tailor the build system for their app. However, outdated or misconfigured tasks can cause longer build times that lead to frustration and lost productivity. The Build Analyzer helps you understand and address bottlenecks in your build by highlighting the plugins and tasks that are most responsible for your overall build time and by suggesting steps to mitigate regressions. Learn more

Java 8 Language library desugaring in D8 and R8

Previous versions of the Android Gradle plugin supported a variety of Java 8 language features for all API levels, such as lambda expressions and method references, through a process called desugaring. In Android Studio 4.0, the desugaring engine has been extended to support Java language APIs, regardless of your app’s minSdkVersion. This means that you can now use standard language APIs, which were previously available in only recent Android releases (such as java.util.stream, java.util.function and java.time). Learn more

Feature-on-feature dependencies

Feature-on-feature dependencies

Feature-on-feature dependencies

When using Android Gradle plugin 4.0.0 and higher, you can now specify that a Dynamic Feature module depends on another feature module. Being able to define this relationship ensures that your app has the required modules to unlock additional functionality, resulting in fewer requests and easier modularization of your app. For example, a :video feature can depend on the :camera feature. If a user wants to unlock the ability to record videos, your app automatically downloads the required :camera module when it requests :video. Learn more

New options to enable or disable build features

The Android Gradle plugin has built-in support for modern libraries, such as data binding and view binding, and build features, such as auto-generated BuildConfig classes. However, you might not need these libraries and features for every project. In version 4.0.0 of the plugin, you can now disable discrete build features, as shown below, which can help optimize build performance for larger projects. For the DSL and full list of features you can control, see the release notes.

android {
    // The default value for each feature is shown below.
    // You can change the value to override the default behavior.
    buildFeatures {
        // Determines whether to support View Binding.
        // Note that the viewBinding.enabled property is now deprecated.
        viewBinding = false
        // Determines whether to support Data Binding.
        // Note that the dataBinding.enabled property is now deprecated.
        dataBinding = false
        ...
    }
}

Android Gradle plugin DSL for enabling or disabling build features

Essential support for Kotlin DSL script files

Android Studio 4.0 now has built-in support for Kotlin DSL build script files (*.kts), which means that Kotlin build scripts offer a full suite of quick fixes and are supported by the Project Structure dialog. While we are excited about the potential for using Kotlin to configure your build, we will continue to refine the Android Gradle Plugin’s DSL API throughout the next year, which may result in breaking API changes for Kotlin script users. Long term, these fixes will make for a more idiomatic, easy-to-use DSL for Kotlin script users.

Dependencies metadata

When building your app using Android Gradle plugin 4.0.0 and higher, the plugin includes metadata that describes the library dependencies that are compiled into your app. When uploading your app, the Play Console inspects this metadata to provide alerts for known issues with SDKs and dependencies your app uses, and, in some cases, provide actionable feedback to resolve those issues.

The data is compressed, encrypted by a Google Play signing key, and stored in the signing block of your release app. If you’d rather not share this information, you can easily opt-out by including the following in your module’s build.gradle file:

android {
    dependenciesInfo {
        // Disables dependency metadata when building APKs.
        includeInApk = false
        // Disables dependency metadata when building Android App Bundles.
        includeInBundle = false
    }
}

Disable dependency metadata for your APKs, app bundle, or both

To recap, Android Studio 4.0 includes these new enhancements & features:

Design

  • Motion Editor: a simple interface for creating, editing, and previewing MotionLayout animations
  • Upgraded Layout Inspector: a real-time & more intuitive debugging experience
  • Layout Validation: compare your UI across multiple screen dimensions

Develop & Profile

  • CPU Profiler update: improvements to make the UI more intuitive to navigate and the data easier to understand
  • R8 rules update: smart editor features for your code shrinker rules, such as syntax highlighting, completion, and error checking
  • IntelliJ IDEA 2019.3 platform update with performance and quality improvements
  • Live Template update: Android-specific live templates for your Kotlin code
  • Clangd support: Clangd and Clang-Tidy turned on by default

Build

  • Build Analyzer: understand and address bottlenecks in your build
  • Java 8 language support update: APIs you can use regardless of your app’s minimum API level
  • Feature-on-feature dependencies: define dependencies between Dynamic Feature modules
  • buildFeatures DSL: enable or disable discrete build features, such as Data Binding
  • Kotlin DSL: essential support for Kotlin DSL script files

For a full list of changes, read the official release notes.

Getting Started

Download

Download Android Studio 4.0 from the download page. If you are using a previous release of Android Studio, you can simply update to the latest version of Android Studio.

As always, we appreciate any feedback on things you like, and issues or features you would like to see. If you find a bug or issue, please file an issue. Follow us -- the Android Studio development team ‐ on Twitter and on Medium.

Announcing v202005 of the Google Ad Manager API

We're happy to announce that v202005 of the Google Ad Manager API is available starting today. This version adds new functionality to several use cases, like managing video ads.

For video ads, v202005 allows you to set competitiveConstraintScope and thirdPartyMeasurementSettings on video LineItems. Also, you can now get the duration of video metadata Content for better targeting. Additionally, you can manage your CMS metadata values by marking them as active or inactive.

Another improvement that v202005 brings is that ActivityGroup.id, Activity.id, and Activity.activityGroupId fields have been changed from type int to type long. So if your API integration is strongly typed, be aware that you might need to make changes for this update.

This release also includes a number of Beta features, like reporting on Nielsen Digital Ad Ratings, creating Makegoods for ProposalLineItems, and managing child networks through Multiple Customer Management. For the full list of API changes for v202005 and all other active API versions, check the release notes.

Feel free to reach out to us on the Ad Manager API forum with any API-related questions.