Introduction to New Features in Android Studio 3.0

Introduction to New Features in Android Studio 3.0

Written by / Google Android Product Manager Jamal Eason

Android Studio 3.0 is now available for download. Announced at Google I/O 2017, Android Studio 3.0 is a significant update to previous versions, aimed at speeding up your application development on Android. This version of Android Studio includes many updates, but there are three main features you shouldn’t miss, including: a brand new set of application analysis tools for quickly diagnosing performance issues; support for the Kotlin programming language; and a new set of tools and wizards to speed up your development on the latest Android Oreo API. We have also improved the stability and performance of Android Studio in several areas. Thank you for your feedback during the preview period of Android Studio 3.0! If you want high stability, want to build quality applications targeting Android Oreo, want to develop using the Kotlin language, or want to use the latest Android application performance tools, you should download Android Studio 3.0 immediately. Below is a list of new features in Android Studio 3.0, organized by main development flow.

Development

Kotlin Programming Language

As we announced at Google I/O 2017, Android development now officially supports the Kotlin programming language. Kotlin is an expressive and concise language that interoperates with existing Android languages and runtimes. This means you can use any number of languages in your application as needed. Kotlin is a production-ready language, and many popular Android applications on Google Play are already using it.

This version of Android Studio is the first bundled milestone to integrate support for the Kotlin language into the IDE. Many of your favorite features (such as code completion and syntax highlighting) can run smoothly on this version, and we will continue to improve the remaining editor features in future releases. You can choose to add Kotlin to your project using the built-in conversion tool provided in Code → Convert Java File to Kotlin File, or create a Kotlin-enabled project using the New Project wizard.

Introduction to New Features in Android Studio 3.0

Kotlin language conversion in Android Studio

Java 8 Language Features

In Android Studio 3.0, we continue to enhance support for Java 8 language features. With the migration to a javac-based toolchain, it’s become easier to use Java 8 language features in your projects. To update your project to support the new Java 8 language toolchain, simply update your source and target code compatibility level to 1.8 in the Project Structure dialog.

Layout Editor

We have updated the component tree in the layout editor, providing better drag-and-drop view insertion capabilities and a new error panel.

Adaptive Icon Wizard

A new wizard can create a set of launcher icon resources and preview how adaptive icons look on different launcher screen icon masks. This version adds support for VectorDrawable layers.

XML Fonts and Downloadable Fonts

If you are targeting Android Oreo (API level 26 and above) with your Android app, now with Android Studio 3.0, you can add custom fonts and downloadable fonts through XML.

Android Things Support – Android Studio 3.0 adds a new set of templates in the New Project wizard and New Module wizard to ease development for the Android Things platform.

IntelliJ Platform Updates

Android Studio 3.0 includes IntelliJ version 2017.1, which includes Java 8 language refactoring, parameter hints, semantic highlighting, draggable breakpoints, enhanced version control search, and more.

Building

Instant Apps Support

With this version of Android Studio, you can add Instant Apps functionality to your projects. Instant Apps were fully supported for development earlier this year; they are lightweight Android apps that users can run directly without installation.

Build Speed Improvements

To further speed up Gradle in larger projects with many modules, we made a rare disruptive change to the Android Gradle plugin API to improve scalability and reduce build times. This change is one of the reasons we jumped the version number from Android Studio 2.4 to 3.0. If you rely on the APIs provided by previous versions of the Gradle plugin, you should verify compatibility with the new plugin and migrate to the new APIs. To test, update the plugin version in your build.gradle file.

Google’s Maven Repository

To achieve smaller and faster updates, Android Studio 3.0 defaults to using Google’s Maven repository instead of the Android SDK manager to find updates for Android support libraries, Google Play services, and Firebase Maven dependencies. If you combine the latest command line SDK manager tools with Gradle, continuous integration builds should migrate to Google’s Maven repository for future Maven repository updates.

Testing and Debugging

Google Play System Images

We have also updated the emulator system images for Android Oreo, now including the Google Play Store. Bundling the Google Play Store allows you to test applications end-to-end using Google Play, and also keeps Google Play services up to date in your Android Virtual Device (AVD). Just like with Google Play service updates on actual devices, you can enable the same updates on AVD.

Introduction to New Features in Android Studio 3.0

Google Play Store in Android Emulator

To ensure application security and a consistent experience with actual devices, the emulator system images containing the Google Play Store have been signed with release keys. This means you will not have root access. If you require root access to help troubleshoot application issues, you can use the Android Open Source Project (AOSP) emulator system images that do not include Google apps or services.

OpenGL ES 3.0 Support in Android Emulator

The latest version of the Android Emulator introduces OpenGL ES 3.0 support for Android Oreo system images, significantly enhancing OpenGL ES 2.0 graphics performance for older emulator system images.

Application Crash Reporter in Android Emulator

To help log errors in applications, we have added a simpler way to generate error reports through the Android Emulator, providing all necessary configuration settings and space to capture reproduction steps.

Proxy Support in Android

If you need to access the internet using a proxy, we have added an interface to manage the HTTP proxy settings used by the emulator.

Android Emulator Quick Boot (Canary)

One of the most common complaints we’ve heard is that the emulator takes too long to start. To address this, we are excited to announce a new feature preview called Quick Boot that can significantly reduce emulator startup time. When this feature is enabled, a cold boot occurs the first time you start the AVD (like powering on a device), but all subsequent starts will be very fast, and the system will restore to the state you left the emulator in (similar to waking a device). If you want to try this feature, make sure you have joined the Canary update channel, and you will find the Android Emulator version v26.2.0 in the SDK manager.

Introduction to New Features in Android Studio 3.0

APK Debugging

Android Studio 3.0 allows you to debug any APK. This feature is particularly useful for developers who write Android C++ code in other IDEs and want to debug and analyze APKs in the Android Studio environment. As long as you have a debuggable version of the APK, you can use the new APK debugging feature to perform static analysis, dynamic analysis, and debugging of the APK. Moreover, if you have access to the source code of the APK, you can link this source code to the APK debugging flow to enhance the fidelity of the debugging process. Just select Profile or debug APK on the Android Studio welcome screen or choose File → Profile or debug APK to use this feature.

Introduction to New Features in Android Studio 3.0

Layout Inspector

In this version, we have added several enhancements to the layout inspector, including better grouping of properties into common categories, as well as search functionality in the view tree and properties panel.

Device File Explorer

With the new Device File Explorer in Android Studio 3.0, you can view the file and directory structure of your Android device or emulator. Now, when testing applications, you can quickly preview and modify application data files directly in Android Studio.

Android Test Orchestrator Support

When used in conjunction with AndroidJUnitRunner 1.0 or higher, the Android Gradle plugin 3.0 supports using the Android Test Orchestrator. The Android Test Orchestrator allows you to run each application test within its instrumentation.

Optimization

Android Profiler

Android Studio 3.0 includes a brand new set of tools to help debug application performance issues. We have completely rewritten the previous Android Monitor toolset in favor of the Android Profiler. After you deploy your application to a running device or emulator, click on the Android Profiler tab to access your application’s CPU, memory, and network activity in a real-time, unified view. Each performance event maps to an interface event timeline that highlights touch events, key presses, and activity changes, allowing you to better understand when and why specific events occurred. Click on each timeline to drill down into your application’s performance.

Introduction to New Features in Android Studio 3.0

Android Profiler – Timeline Combined View

Introduction to New Features in Android Studio 3.0

CPU Profiler

Introduction to New Features in Android Studio 3.0

Memory Profiler

Introduction to New Features in Android Studio 3.0

Network Profiler

APK Analyzer Improvements

We have also added some additional enhancements to the APK Analyzer to help you further optimize the size of your APK.

To summarize, Android Studio 3.0 includes the following major new features:

Development

  • Kotlin Language

  • Java 8 Language

  • Layout Editor Improvements

  • Adaptive Icon Wizard

  • XML Fonts and Downloadable Fonts

  • Android Things

  • IntelliJ Platform Update 2017.1

Building

  • Instant Apps Support

  • Build Speed Improvements

  • Changes to Google’s Maven Repository

Testing and Debugging

  • Emulator Google Play System Images

  • Emulator OpenGL ES 3.0 Support

  • Emulator Proxy Support

  • Application Crash Reporter

  • Android Wear Rotational Input

  • Android Emulator Quick Boot (Canary)

  • APK Debugging

  • Layout Inspector

  • Device File Explorer

Optimization

  • CPU Profiler

  • Memory Profiler

  • Network Profiler

  • APK Analyzer Improvements

Getting Started

If you are using a previous version of Android Studio, you can upgrade to Android Studio 3.0 immediately or download the update from the official Android Studio Preview download page. As mentioned in this blog post, to support some of the new features in this IDE, we made some disruptive changes to the Gradle Plugin API. Therefore, you should also update the Android Gradle plugin version in your current project to 3.0.0 and test and validate your application project settings. We appreciate any feedback you provide regarding features you like, issues you encounter, or features you would like to see. If you find bugs or issues, feel free to submit them. Contact us (the Android Studio development team) on our Google+ info page or Twitter.

For more details, please click “Read the original” at the end of the article.

Introduction to New Features in Android Studio 3.0

Leave a Comment

×