SPEAKER: Android Studio version 4.2 is now
available for download on the stable channel.
This new version of Android Studio
contains improvements to the Database Inspector,
Layout Inspector, Systems Trace, and Apply Changes.
It also add new functionality, including an upgrade assistant
for the Android Gradle plugin, support for Safe Args Gradle
plugin, app sign-in configuration per variant,
and the ability to deploy to multiple devices
with a single click.
Android Studios' Database Inspector
is a debugging tool that lets you
interact with SQLite databases while debugging your app.
With Android Studios 4.2, we've made the Inspector Editor
surface larger and resizable to help you write and execute
your custom SQL statements.
Additionally, we now provide a history
of your previous queries, so that you can quickly
run them again as needed.
We've also added the ability to keep inspecting your app's
databases after process disconnects,
making it easier to debug your app after a crash.
On the UI debugging site, Layout Inspector
is a powerful tool that displays a detailed view
of your running apps layout.
Layout Inspector provides real time updates
as you interact with your app.
You can also disable real-time updates
to see specific layout snapshots.
With Android Studio 4.2, you can manually
refresh the UI snapshot by first disabling the live updates
option and then clicking on the Refresh button
to manually update the layout and its details in the tool
window.
In the CPU Profiler, the System Trace feature
now includes new metrics for analyzing performance.
All trace events of a selected threat
are now in a dedicated tab.
In the display section, the app's surface, BufferQueue,
is now tracked to help you understand the state of image
buffers as they move between the different Android graphics
components.
In addition to CPU scheduling data,
we also included CPU frequency by core.
This shows how hard each core is working, and may give you
an idea of which ones are the big or little cores
in modern mobile processors.
The new Process Memory section shows
the amount of physical memory currently in use by your app.
See more details in the link attached
in the video description below.
We've also worked on improving Apply Changes, which now allows
you to add static final primitive fields by clicking
either Apply Code Changes or Apply Changes and Restart
Activity.
In addition, you can add resources
by clicking Apply Changes and Restart Activity.
If you want to see your app running across multiple device
configuration at the same time, you
can now deploy your app to multiple devices
by selecting the multiple devices option in the Deploy
Configuration.
Just select the devices you want,
click OK, and then deploy your app.
Safe Args is a Gradle plug-in that
generates simple object and builder
classes for type safe navigation and access
to any associated arguments.
With Android Studio 4.2, it includes
ideal support for autocompletion for directions, args,
and the various builder classes, support for both Java
and Kotlin safe args plug-ins, and navigation from source
to XML.
With Android Studio 4.2, we're introducing the Android Gradle
plugin, Upgrade Assistant, to help you preview changes
before upgrading it in your project.
It will propose you to upgrade the plugin,
but also Gradle itself.
Android Gradle Plugin 4.2 introduces some changes,
Java programming language version
8 by default, which provides access
to a number of newer language features, including lambda
expressions, method references, and static interface method,
new resource compiler, which potentially improves build
performance especially on a Windows machine,
APK v3 and APK v4 signing formats are now supported,
and behavior change for gradle.properties files.
It will no longer possible to override Gradle properties
from subprojects.
In other words, if you declare a property in a gradle properties
file in a subproject instead of the root project,
it will be ignored.
Android Gradle plugin 4.2 uses Bundletool 1.0.0,
which introduces a behavior change
for apps using feature modules.
Any feature modules specified as dist:install-time that's not
explicitly marked as dist:removable will become
non-removable by default. This new setting optimizes fusing
of install time modules with a base module,
potentially improving app performances for some apps.
For more information on this setting,
see the documentation for the dist:removable tag
in the documentation for feature module manifest.
It is now possible to enable or disable app signing in Android
Gradle plugin per variant.
This example demonstrates how to set app assigning per variant
using the invariant methods in either Kotlin or Groovy.
Available in version 1.0 of the command line tools,
R8 retrace is a standalone tool for obtaining
the original stack trace of an obfuscated stack trace.
You can download this package with the SDK manager,
which installs R8 retrace in your Android SDK
folder/commandline-tools.
The Android SDK home environment variable
is now deprecated and has been replaced by Android Prefs Root.
For more information about emulator and variant variables,
you can check out the link attached
in the video description below.
Enjoy Android Studio 4.2 and remember
that we are listening to your feedback on our bug tracker.
For next versions of Android Studio,
we're changing the version naming scheme,
and the upcoming one is Arctic Fox.
Check out early builds on the Canary channel.
Don't forget to subscribe to our YouTube channel
to get notified of new content, and share
this video with your friends and your colleagues.
See you soon.