SPEAKER: This is Android Tool Time, Google AO edition where
we announced a preview of the new Android Studio 3.0,
now available for download in the Canary channel.
We decided to bump the major version to 3.0, thanks
to the many new features and some breaking
changes that we're introducing in this release.
We've been listening to user feedback
about adding more languages support to the platform.
Something fun, concise, and expressive, like Kotlin.
So we've decided to bundle Kotlin support
with Android Studio 3.0, allowing developers
to immediately start using it in their apps.
You can choose to enable Kotlin in the new project wizard,
and the generated activities will use it by default.
Or, when adding new activities to your projects,
you can use the language selector at the bottom
to switch between languages.
And finally, the convert Java file to Kotlin file refactoring
will help when converting your existing classes.
Android Studio 3.0 is based on the 2017.1 branch of IntelliJ
IDEA, and includes all the enhancements
from this, and the previous stable release,
including parameter hints for method
codes, semantic highlighting, smart conflict
resolution and syntax highlighting
in version control, and more.
To help developers bring Android O features to their apps,
we're adding support for front resources,
and adaptive icons in the IDE.
You can now create and preview XML and binary fonts
in the fonts resource folder.
The Layout Editor also lets you pick downloadable fonts
from the Google fonts site for text views.
To create an adaptive launcher icon for your app,
open the Asset Studio, and select the foreground
and background images that you'd like to use.
Of course, we're also including O system images for the Android
emulator so you can test your changes on the current O
developer preview build.
Coinciding with Android Studio 3.0,
there are also big changes in the build system.
We have built bytecode transformations called Desugar
into the default toolchain, enabling developers
to use Java 8 language features in their code and libraries.
We support lambdas, method references, default
and static interface methods, and try-with-resources
on all API levels.
If you were previously using Jack, which is now deprecated,
or some other bytecode rewriter such as retrolambda,
migrating is as simple as removing them
from your build files.
With the new Gradle plugin, we are bringing performance
enhancements to the build process,
such as dependency resolution at execution time,
faster builds for projects with a large number of modules,
and incremental dexing.
To support more fine-grain dependency configuration,
including variant awareness for library modules,
we had to introduce breaking changes to our Gradle DSL.
So please refer to the documentation
for migration steps.
To reduce the burden of setting up and maintaining CI servers,
we are also launching Google's Maven Repo as a place
where we distribute Google's build artifacts.
At launch, we provide the Android Support libraries,
and you can start using them by adding the Maven Repo
URL to your Gradle files.
OK, let's talk about some more updates in the IDE itself.
For debugging performance problems with your apps,
we now ship the unified Android profiler in-studio.
It's really a set of three profilers-- for CPU, memory,
and network, shown on a single timeline that also includes
various app events, such as user inputs, rotations,
and activity changes.
By clicking on any of the three profilers,
you can open the detailed view.
For CPU, this includes a list of threads,
and a way to record and explore method traces.
The memory view now shows a more detailed breakdown
of where the memory is allocated,
as well as lets you track object allocations,
and dig into heap dumps.
The network tab, apart from showing network activity
on a graph, includes request and response information,
such as headers and payloads for HTTP requests
that were made using one of the supported clients.
For now, we support HTTP URL connection, and recent versions
of Volley, and OkHttp.
Please note that when trying out the Android profiler
on pre-O devices and emulators, you
have to enable advanced profiling in the run
configuration window in order to see full information.
If you're writing C or C++ code in another IDE,
or perhaps you're using other tools,
such as game engine toolkits, to create your APK,
you can now use the 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.
Android 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 the new refactoring system,
they help modularize your app.
The App Links Assistant helps set up the necessary app links
support, while deploying an app includes automatic device
provisioning for running Instant Apps.
If you run into any problems when testing Instant
App builds, we've updated the APK analyzer
to open Instant App zip bundles.
But that's not all.
The text viewer now supports loading ProGuard mapping files
to show removed and retain nodes,
and can generate ProGuard keep rules.
It also has an improved user interface,
including filtering and search, lets you explore method usages,
inspect bytecode decompiled to smile format,
and supports multidex.
The Layout Editor and the Layout Inspector
are both getting updates to make iterating on layouts easier.
The editor includes better right to left support, new constraint
layout features such as chains and barriers,
and has a new error panel showing
problems in your layouts--
for example, when you're missing constraints.
If you need to pull files from a device or emulator,
try out the Device File Explorer, a much more
user-friendly way to browse the remote file system
than using ADB, for example.
And finally, we have exciting updates
in the Android emulator.
For the first time, we're shipping emulator system images
which contain the full Play Store, enabling
you to seamlessly test integrations with other apps
without having to sideload APKs.
Placed around the emulator also means
that you no longer have to deal with outdated Google Play
services libraries, which will automatically update, just
like on a real Android device.
Please note that the Play emulator
images are signed with release keys,
so you won't be able to get elevated privileges.
If you require root access, you can use the standard AOSP
emulator builds.
Other important changes in the emulator
include OpenGL ES 3.0 compatibility,
a new bug reporting tool under Emulator Help, Wi-Fi network
emulation, and a proxy settings page.
For ware developers, we added rotary input controls.
Whew.
As you can see, there are a lot of new things
to play with in this release of Android Studio.
Remember that we're doing these previews to get your feedback,
and fix bugs that you find in your projects.
You can use the new Android issue tracker
to get in touch with us.
And be sure to follow Android Studio on Twitter for updates.
[MUSIC PLAYING]