BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Android Studio 3.2 Canary Brings Better Traces Support, Lint Checking, and More

Android Studio 3.2 Canary Brings Better Traces Support, Lint Checking, and More

Leia em Português

This item in japanese

Google has released Android Studio 3.2 Canary in the Canary and Dev channels. This version comes with improvements on core Android Studio IDE, as well new Android Profiler, Android Jetpack, import/export CPU traces, record CPU activity during startup, lint checking and more.

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2018.1.1 release. This is mostly a bug-fix update, including an important fix that restores the automatic check for updates. Android Jetpack is a set of libraries, tools and architectural guidance to help developers build great apps quicker and easier. Now it is possible to save Profiler data as "sessions" and revisit and inspect it at a later moment (the profiler keeps data until the next IDE restart).

There is a new System Trace in the CPU Profiler, which allows developers to inspect the device's system CPU and thread activity. Furthermore, it is useful to investigate system-levels issues, such as UI jank, and you can visually mark important code routines in the profiler timeline by instrumenting your code with the Trace class. With Android Studio 3.2, you can inspect JNI references using the Memory Profiler. It is possible to inspect memory allocation for JNI code if you deploy your app to a device running Android 8.0 (API level 26) or higher. Another new feature only available for apps deployed to Android 8.0 or higher, is the possibility to record CPU activity during app startup. Indeed, it is possible to export your CPU activity record as a ".trace" file. You can import and inspect ".trace" files created with the Debug API or CPU profiler into Android Studio 3.2.

Android Studio 3.2 includes many new and improved features for lint checking. New lint checks were added to make sure that your Java code interoperates well with your Kotlin code. These checks include looking for the presence of Nullability annotations, placing lamba parameters last, etc. You need to add the following settings to your build.gradle to enable it.

android {
  lintOptions {
    check 'Interoperability'
  }
}

Other improvements brought by Android Studio 3.2 are:

  • Data Binding Library version 2;
  • R8, a new tool for code-shrinking and obfuscation that replaces ProGuard;
  • Improved editor for CMake build files with syntax highlighting and code completion, code reformatting, and safe refactoring;
  • Navigation of external header files;
  • Native multidex enabled by default;
  • AAPT2 moved to Google's Maven repository;
  • Android P Developer Preview;
  • Sample Data, allows developers to use placeholder data to aid in the design of an app;
  • Material Design Update;
  • What's New Assistant, a new assistant panel that opens automatically after an update to inform you about the latest changes to the IDE;
  • Emulator Snapshots, with Quickboot is possible to create snapshots at any emulator state and start them in under two seconds.

If you already have an Android Studio build on the Canary or Dev channel, you can get the update by choosing Help > Check for Updates (Android Studio > Check for Updates on Mac). Otherwise, you can download it here.

Rate this Article

Adoption
Style

BT