Tag Archives: androidstudio

Android Studio 3.4

Posted by Jamal Eason, Product Manager, Android

After nearly six months of development, Android Studio 3.4 is ready to download today on the stable release channel. This is a milestone release of the Project Marble effort from the Android Studio team. Project Marble is our focus on making the fundamental features and flows of the Integrated Development Environment (IDE) rock-solid. On top of many performance improvements and bug fixes we made in Android Studio 3.4, we are excited to release a small but focused set of new features that address core developer workflows for app building & resource management.

Part of the effort of Project Marble is to address user facing issues in core features in the IDE. At the top of the list of issues for Android Studio 3.4 is an updated Project Structure Dialog (PSD) which is a revamped user interface to manage dependencies in your app project Gradle build files. In another build-related change, R8 replaces Proguard as the default code shrinker and obfuscator. To aid app design, we incorporated your feedback to create a new app resource management tool to bulk import, preview, and manage resources for your project. Lastly, we are shipping an updated Android Emulator that takes less system resources, and also supports the Android Q Beta. Overall, these features are designed to make you more productive in your day-to-day app development workflow.

Alongside the stable release of Android Studio 3.4, we recently published in-depth blogs on how we are investigating & fixing a range of issues under the auspices of Project Marble. You should check them out as you download the latest update to Android Studio:

The development work for Project Marble is still on-going, but Android Studio 3.4 incorporates productivity features and over 300 bug & stability enhancements that you do not want to miss. Watch and read below for some of the notable changes and enhancements that you will find in Android Studio 3.4.

Develop

  • Resource Manager - We have heard from you that asset management and navigation can be clunky and tedious in Android Studio, especially as your app grows in complexity. The resource manager is a new tool to visualize the drawables, colors, and layouts across your app project in a consolidated view. In addition to visualization, the panel supports drag & drop bulk asset import, and, by popular request, bulk SVG to VectorDrawable conversion. These accelerators will hopefully help manage assets you get from a design team, or simply help you have a more organized view of project assets. Learn more.

Resource Manager

  • Import Intentions - As you work with new Jetpack and Firebase libraries, Android Studio 3.4 will recognize common classes in these libraries and suggest, via code intentions, adding the required import statement and library dependency to your Gradle project files. This optimization can be a time saver since it keeps you in the context of your code. Moreover, since Jetpack libraries are modularized, Android Studio can find the exact library or minimum set of libraries required to use a new Jetpack class.

Jetpack Import Intentions

  • Layout Editor Properties Panel - To improve product refinement and polish we refreshed the Layout Editor Properties panel. Now we just have one single pane, with collapsible sections for properties. Additionally, errors and warnings have their own highlight color, we have a resource binding control for each property, and we have an updated color picker.

Layout Editor Properties Panel

  • IntelliJ Platform Update - Android Studio 3.4 includes Intellij 2018.3.4. This update has a wide range of improvements from support for multi-line TODOs to an updated search everywhere feature. Learn more.

Build

  • Project Structure Dialog - A long standing request from many developers is to have a user interface front end to manage Gradle project files. We have more plans for this area, but Android Studio 3.4 includes the next phase of improvement in the Product Structure Dialog (PSD). The new PSD allows you to see and add dependencies to your project at a module level. Additionally, the new PSD displays build variables, suggestions to improve your build file configuration, and more! Although the latest Gradle plugin v3.4 also has improvements, you do not have to upgrade your Gradle plugin version number to take advantage of the new PSD. Learn more.

Project Structure Dialogue

  • R8 by Default - Almost two years ago we previewed R8 as the replacement for Proguard. R8 code shrinking helps reduce the size of your APK by getting rid of unused code and resources as well as making your actual code take less space. Additionally, in comparison to Proguard, R8 combines shrinking, desugaring and dexing operations into one step, which ends up to be a more efficient approach for Android apps. After additional validation and testing last year, R8 is now the default code shinker for new projects created with Android Studio 3.4 and for projects using Android Gradle plugin 3.4 and higher. Learn more.

Test

  • Android Emulator Skin updates & Android Q Beta Emulator System Image - Inside of Android Studio 3.4 we released the latest Google Pixel 3 & Google Pixel 3 XL device skins. Also with this release, you can also download Android Q Beta emulator system images for app testing on Android Q. Please note that we do recommend running the canary version of Android Studio and the emulator to get the latest compatibility changes during the Android Q Beta program.

Android Emulator - Pixel 3 XL Emulator Skin

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

Develop

  • Resource Manager
  • Import Intentions
  • Layout Editor Properties Panel
  • IntelliJ 2018.3.4 Platform Update

Build

  • Incremental Kotlin annotation processing (Kotlin 1.3.30 Update)
  • Project Structure DialogR8 by Default

Test

  • Emulator Device Skins
  • Android Q Beta Emulator System Image Support

Check out the Android Studio release notes, Android Gradle plugin release notes, and the Android Emulator release notes for more details.

Getting Started

Download

Download the latest version of Android Studio 3.4 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. If you want to maintain a stable version of Android Studio, you can run the stable release version and canary release versions of Android Studio at the same time. Learn more.

To use the mentioned Android Emulator features make sure you are running at least Android Emulator v28.0.22 downloaded via the Android Studio SDK Manager.

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

Android Studio 3.3

Posted by Jamal Eason, Product Manager

We are excited to kick off the new year with a stable release of Android Studio 3.3 focused on refinement and quality. You can download it today from developer.android.com/studio. Based on the feedback from many of you, we have taken a step back from large features to focus on our quality fundamentals. The goal is to ensure Android Studio continues to help you stay productive in making great apps for Android. Since the last stable release, Android Studio 3.3 addresses over 200 user- reported bugs. This release also includes official support for Navigation Editor, improved incremental Java compilation when using annotation processors, C++ code lint inspections, an updated new project wizard, and usability fixes for each of the performance profilers. In addition, saving snapshots on exit for the Android emulator is 8x faster.

Android Studio 3.3 kicks off the broader quality focus area for the year, which we call Project Marble. Announced at the Android Developer Summit in November 2018, Project Marble is the Android Studio team's focus on making the fundamental features and flows of the Integrated Development Environment (IDE) rock-solid, along with refining and polishing the user-facing features that matter to you in your day-to-day app development workflows. In Project Marble, we are specifically looking at reducing the number of crashes, hangs, memory leaks, and user-impacting bugs. We are also investing in our measurement infrastructure to prevent these issues from occurring. Stay tuned for more updates and details as we progress on this initiative.

This release of Android Studio is a solid milestone for the product. If you want the latest in feature refinement and quality, then download Android Studio 3.3 today on the stable release channel. Watch and read below for some of the notable changes and enhancements that you will find in Android Studio 3.3.

Develop

  • Navigation Editor - The navigation editor is a visual editor which allows you to construct XML resources that support using the new Jetpack Navigation Component. With the Navigation Editor and the Navigation Component, you can build predictable interactions between the screens and content areas of your app. This editor was previewed in an earlier Android Studio release, but based on your feedback we held this feature to improve the quality of the feature. Thank you to the developers who gave us feedback. Learn more.

Navigation Editor

  • IntelliJ Platform Update - Android Studio 3.3 includes Intellij 2018.2.2. This is a significant platform release from Jetbrains, with new previews for the code editor, updated icons, MacBook Touch Bar support, plus enhanced version control integrations. Learn more.
  • Kotlin Update - This release of Android Studio bundles Kotlin 1.3.11, with support for Kotlin coroutines and contracts plus IDE support for the recommend Kotlin coding style. Learn more.
  • Clang-Tidy Support for C++ - Android Studio now has support for Clang-Tidy for C++ static code analysis. Similar to the current lint support for Java and Kotlin in Android Studio, Clang-Tidy helps those who have C++ in their Android app identify common coding errors and bugs. Enable the inspection by going to SettingsEditorInspections (Preference → EditorInspections for MacOS) . Lean more.

Clang-Tidy Code Inspection Settings

  • New Project Wizard update - To support the range of device types, programming languages, and new frameworks, we have updated the New Project Wizard for Android Studio. You can access the same project templates in a more streamlined user experience.

New Project Wizard

  • Delete Unused IDE Directories - To help you upgrade to the newest version of Android Studio, we have added a new feature to help clean up unused settings & cache directories. Past versions of Android Studio left these old directories that were hard to find and remove on your hard drive. When you first run Android Studio 3.3 and higher, the new dialog suggests directories that you can safely remove from past installations of Android Studio.

Delete Unused Directories Dialogue

  • IDE User Feedback - To help us to create a better product, we have started to include in-product sentiment buttons for quick feedback. For those who opt-in to sharing usage data, feel free to click on the icon that suits your sentiment while using Android Studio. To opt-in to give in-product feedback go to SettingsAppearance & BehaviorSystem SettingsData Sharing ( PreferencesAppearance & BehaviorSystem SettingsData Sharing for MacOS).

IDE User Feedback

Build

  • Improved incremental Java compilation when using annotation processor - This update decreases build time by improving support for incremental Java compilation when using annotation processors. The optimization requires Android Gradle plugin 3.3.0 or higher. Learn more.
  • Lazy task configuration - The plugin uses Gradle's new task creation API to avoid initializing and configuring tasks that are not required to complete the current build (or tasks not on the execution task graph). For example, if you have multiple build variants, such as "release" and "debug" build variants, and you're building the "debug" version of your app, the plugin avoids initializing and configuring tasks for the "release" version of your app. Learn more.
  • Single-variant project sync - Along with build speed, project sync speed can be a development bottleneck to for those who have large app projects with multiple build variants. In this version of the IDE, you can you can limit syncing to only the active build variant. In order for this optimization to work, your project needs to use Android Gradle plugin 3.3.0 or higher. You can enable this option under the Experimental preferences in Android Studio 3.3.

Single-Variant Project Sync

  • Android App Bundles now support Instant Apps - You can now build and deploy Google Play Instant experiences from a single Android Studio project, and include them in a single Android App Bundle. Launched last year, the Android App Bundle is the new standard Android app publishing format that you can build with Android Studio. This update streamlines and unifies the build artifacts that you upload to Google Play. Learn more.

Test

  • Multiple Emulator AVD instances - Android Emulator 28.0 now supports the ability to launch multiple instances of the same Android Virtual Device (AVD). Each instance of the AVD uses a minimal set of system resources. For those developers with continuous integration (CI) testing environments, this can be a convenient way to run tests in parallel off one AVD configuration. On the command line run the following commands:
    $./emulator -avd <avdname> -read-only &
    $./emulator -avd <avdname> -read-only &
    

    Android Emulator: Multiple AVD Launch

  • Android 9 Pie Emulator System Images & Wi-Fi P2P - Alongside Android Studio 3.3, you can also download Android 9 system images for your emulator for your app testing. The Google Play emulator system images not only passe the official Android Compatibility Test Suite (CTS), they also include support for Peer-to-Peer Wi-Fi direct connections between two emulators. To start using this feature, launch the emulator (v28.0.22 or higher) via the command line and ensure the two emulators share the same Wi-Fi server and client port command line arguments.
    $./emulator @<server-avd-name> -wifi-server-port 9999
    $./emulator @<client-avd-name> -wifi-client-port 9999
    

    Android Emulator: Wi-Fi P2P Setup

  • Emulator Snapshot Save Speed - We have heard from you that you enjoy using snapshots and quickboot, but felt the time taken to close the emulator and Quickboot save a snapshot was slow. To solve this, we optimized the way snapshots are saved and managed, using a mapped file to save guest RAM. From aggregate metrics, we found that this optimization led to driving down the average quickboot save time from the last stable version to now from 27 seconds down to 3 seconds — a 8x improvement. Learn more about this enhancement and other recent improvements to the emulator here.

Optimize

  • Profiler performance improvements - Based on your feedback, we have dramatically improved Android Studio performance while using the profilers in this release. We've seen improvements on average of 2x in frame rates in our local tests. Please continue to provide feedback, especially if you continue to see performance issues.
  • Memory Profiler allocation tracking options - In previous releases, we have heard from you that, in some cases, your app performs significantly worse while profiling with the default settings. To address this, we have changed the default Memory Profiler capture mode on Android 8.0 Oreo (API level 26) and higher devices to sample for allocations periodically. You can adjust this setting in the Allocation Tracking dropdown menu. By default, we also now temporarily turn off allocation tracking during CPU recordings to minimize the impact on recording results. Learn more.

Memory Profiler: Allocation Tracking Options

  • Network Profiler formatted text - The Network profiler in Android Studio 3.3 now formats common text types found in network payloads by default, including HTML, XML and JSON. You can toggle between formatted and raw text by navigating to either the Response or Request tab, and click on the View Parsed / View Source link. Learn more.

Network Profiler: Formatted Text

  • CPU Profiler frame rendering data - The CPU Profiler now shows you the render time for each frame on the main UI thread and Render Thread when you record with Trace System Calls. If you are trying to investigate and understand the bottlenecks or the source of UI jank in your app, this data can come in handy to see where you can improve your app performance. Learn more.

CPU Profiler: Frame Rendering Data

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

Develop

  • Navigation Editor
  • IntelliJ 2018.2.2 Platform Update
  • Kotlin 1.3.11 Update
  • Clang-Tidy Support for C++
  • New Project Wizard update
  • Delete Unused IDE Directories
  • IDE User Feedback

Build

  • Improved incremental Java compilation when using annotation processors
  • Lazy task configuration:
  • Single-variant project sync
  • Android App Bundles now supports Instant Apps

Test

  • Multiple Emulator AVD instance Launch
  • Android 9 Pie - Emulator System Images
  • Emulator Snapshot Save Speed Improvement

Optimize

  • Profiler Performance Improvements
  • Memory Profiler: Allocation Tracking Options
  • Network Profiler: Formatted Text
  • CPU Profiler: Frame Rendering Data

Check out the Android Studio release notes, Android Gradle plugin release notes, and the Android Emulator release notes for more details.

Getting Started

Download

Download the latest version of Android Studio 3.3 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 well. If you want to maintain a stable version of Android Studio, you can run the stable release version and canary release versions of Android Studio at the same time. Learn more.

To use the mentioned Android Emulator features make sure you are running at least Android Emulator v28.0.22 downloaded via the Android Studio SDK Manager.

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