WOJTEK KALICINSKI: Android Studio 3.0
is finally ready for download in the stable channel.
It brings about many improvements
that will make developer experience smoother,
but also some important changes that might require attention.
Android Studio 3 is the first release
in which we've added Kotlin support out of the box,
and we turn on fully supporting it going forward.
Kotlin is a fun and expressive language
that has grown popular with Android developers.
Thanks to high interoperability with existing Java code,
you can now immediately start using it in your apps.
We continue to support the Java programming language,
and with the newest Android Gradle plugin,
we're enabling developers to use Java 8 language features
in their code and libraries.
We have built bytecode transformations called desugar
into the default toolchain, and it
supports lambdas, method references, default
and static interface methods, and try-with resources,
and new annotation types on all API levels.
The experimental Jack compiler is now deprecated and migrating
is as simple as removing it from your build files.
With the new Android Gradle plugin version 3,
we are also bringing performance enhancements
to the build process, such as delayed dependency resolution,
more incremental dexing, and faster sync times.
We're also bringing variant awareness
for library modules, which unfortunately
meant we had to make some breaking changes to our Gradle
DSL.
So please follow the migration steps in the documentation
when switching to 3.0.
Especially developers with large multi-module projects
should see a significant decrease
in build times with these changes.
Starting with this release, we are
switching to AAPT2 for resource processing, which
enables more incremental and parallelized builds and even
some potential size savings in the resources file
without any changes required to your projects,
thanks to automatic version collapsing, resource
deduplication, and support for sparse configurations on minSdk
26.
On the IDE side, we're making changes
to help developers bring Android Oreo features to their apps.
We've added support for font resources, which you can now
create and preview in the Fonts Resource folder.
The Layout Editor also lets you pick fonts
from the Google Fonts catalog and attach them
to your projects.
For creating adaptive launcher icons introduced
in Android Oreo, open the Asset Studio
and select the foreground and background images
that you'd like to use.
We've also included Android emulator images
running Android Oreo so you can test your changes.
To make it easier to set up and maintain CI servers,
we have also launched Google's Maven Repo as a place
where we distribute Google's build artifacts.
You can start using it by adding the Maven Repo
URL to your Gradle files.
Debugging performance problems with your apps
is also about to get a lot better,
thanks to the new unified Android Profiler in Studio.
It lets you inspect CPU, memory, and network usage,
and includes a single timeline that
also shows important app events, such as keypresses, taps,
and rotations.
With advanced profiling, you can record CPU traces,
track object allocations, and dig
into heap dumps in the memory profiler
And this is completely new, by the way--
you can show request and response information
and payloads for HTTP calls that were made using
one of the supported clients.
For now, we support HttpURLConnection and OkHttp,
as well as any client using these under the hood.
If you're writing C or C++ code in another IDE,
or perhaps you're using other tools,
such as game engine toolkits, to build your APK,
you can now use Android Studio native debugger with your app.
Open the APK for debugging, attach the debug
symbols and sources, and you will
be able to step through code just as with an app developed
inside Studio.
3.0 is the first release to support
creation of Instant Apps from your Android projects.
There are two new module types--
Instant App and Feature.
Together with a new refactoring system,
they help modularize your app, while the App Links
Assistant helps set up the necessary App Links support.
If you run into any problems when testing Instant
App builds, we've updated the APK analyzer
to open zip bundles.
But that's not all.
APK analyzers DEX Viewer now supports
loading ProGuard mapping files to show removed and retained
classes and can generate ProGuard keep rules.
It also has an improved user interface showing DEX code
sizes, lets you explore method usages,
inspect bytecode, and supports multidex.
Starting with BuildTools 26.1, you
can also get all these features in the brand new command line
version of the APK Analyzer, which
is great for generating reports and tracking APK size
regressions on a CI server.
When working with layouts, you can now iterate faster
using the Layout Editor and Layout Inspector, which
are both getting some updates.
The Editor includes a new error panel
showing problems such as missing constraints, and support
for new constraint layout features,
such as barriers, groups, and enhanced chains creation.
And the Inspector received a UI refresh
and Quick Search for the Properties list and the View
Tree.
If you need to pull files from a device or emulator,
try the Device File Explorer, a much more user friendly way
to browse the connected file system than using adb
from a command line.
We've also had some important improvements in the Android
Emulator since the last release of Studio,
and that includes new system images
with full Play Store, OpenGL ES 3.0
compatibility, a proxy settings page, and a bug reporting tool.
There are many, many new things to play with in this release
of Android Studio.
Have fun exploring, and check out
the other videos detailing some of the features
in this release.