Alexis Moussine-Pouchkine: Hey, everyone.
We're here at Devoxx 2014.
And I'm here with Tor.
And we're here to talk about, guess what?
Android tooling.
TOR NORBYE: Yes.
MALE SPEAKER: So welcome, Tor .
TOR NORBYE: Thank you.
MALE SPEAKER: You've been covering
what's new in Android in a session on Android tooling.
And then there's several parts to it.
Obviously, Lollipop was just released,
but you're working on Android Studio, which
is bringing a whole lot of new things
to-- Android developers to the table.
So built systems, new features, a lot of new things.
So for those that haven't been following, maybe
you can recap where we are.
TOR NORBYE: Yeah.
So Android Studio is something we
announced a couple years now.
And it's a brand new IDE for us.
But it's built on top of the rock-solid IntelliJ IDE,
so that gives you sort of very good job editor and XML editor
to begin with.
But then we've added some additional Android features
to make it more productive for Android development.
And so that's sort of the core IDE
that we're building all these other extra tools around.
So one of the big changes in Android Studio
is that we've added support for the Gradle
build system, which adds a lot of very, very useful features
for Android developers in particular.
It makes it very easy to, for example, with a single source
base, make your app target have both
a free version and a pro version.
Or you may want to very easily create
a beta build that you distribute to some users
and then release build for others.
You can do that very easily.
MALE SPEAKER: So the other, obviously-- reason you
would want to have this is you can
run your whole build outside of the IDE.
Not that the IDE is not good, but there's so many more things
you can do when you're--
TOR NORBYE: Yeah.
I mean, I think it's pretty well recognized at this point
that you want to have a build-- you want to shape APKs
that you didn't build on your system.
You want to have it sort of taken from the build server,
where you're also running your tests.
Right?
Sort of a continuous integration server where the team sort of
commits, and it runs and makes sure that everything is all
right.
We had a problem before Android studio and before the Gradle
build system, where we would implement one build system
in Eclipse, and then we have another one
from ANT on the command line.
And so they weren't always the same,
and it was very difficult to target the same features.
So now we've sort of made the decision
that there is one build system.
And it's used both in the IDE and on the server.
And that is the Gradle one.
And then we do all this work on Android Studio
to sort of make that work well, so
that even though the build system is configured
with Gradle files, you don't have to know that.
You can sit in your IDE, open up the product search dialog,
and say, I want to add a free flavor,
and I want to add a pro flavor, and I want to use this version.
You can do it all graphically.
MALE SPEAKER: Right.
But if you wanted to get dirty--
TOR NORBYE: And people do.
I mean, we see a lot of expert users.
We talk to people who had hundreds and even
thousands of line scripts to do all these complicated packaging
tasks.
And they can now just replace it with small Groovy script.
And that's a big win for them.
MALE SPEAKER: Right.
So that's the point of using Gradle in this case.
So Android, at this point, is at a place
where you can target phones and tablets.
And if we stick to that parameter for a second--
TOR NORBYE: Phones and tablets and, you know, watches.
MALE SPEAKER: Right.
We'll get to that.
TOR NORBYE: OK.
All right.
OK.
MALE SPEAKER: Just phones and tablets.
TOR NORBYE: Yes.
Only phones and tablets.
That's it.
MALE SPEAKER: No, but that's a hard job already.
So what kind of support can you expect in Android Studio
to help developers develop for those different form factors?
And we'll get to wearables and to other things.
In terms of visual tooling in terms of hints or, you know.
TOR NORBYE: That's us.
We have a number of features to help with this.
So I think maybe the most easy to understand
one is that you can view your layouts
graphically inside the IDE.
And we have this feature, which lets you say, hey,
I want to see this layout, but I want
to see what it's going to look like in a right-to-left lookout
and a left-to-right lookout at the same time.
Or I want to see with this is going
look like across different versions of Android,
so you can sort of see both the Material look
and the Holo look and even the Gingerbread look.
Or you can say, I want to see what this layout looks
like across these different translations.
So you can quickly see, hey, this one language,
my strings are wrapping.
So you can sort of-- in Android, it's very easy
to provide resources across different configurations,
is what they're called.
Like, an example of that would be
like landscape versus orientation.
You can very easily say, hey, this is my landscape layout.
This is my portrait layout.
And so we make it very easy to sort of view all that
and see what happens to a layout across these different--
localization, orientation, all that stuff.
MALE SPEAKER: Right.
So that in itself is really a useful feature.
So now, of course, if you add to the mix
the fact that we have wearables, and the way you develop
for wear, Android wear, specifically,
is by either the notifications-- but if you
want to build an app for Wear, that's
an APK that's bundled in the other APK.
So there's a whole build system, and Android Studio
helps for that.
TOR NORBYE: That's right.
So there actually is special support for, for example,
Android Wear, in the Android build system.
And by the Android build system, I
mean the Gradle build system that we've
extended with an Android plug-in.
It's pretty easy.
With a small set of files, you say, hey, this is a Wear app.
And here's some additional parameters.
And we will actually build all this.
We'll take care of building the APK,
like it's bundled in the other thing.
And we have more features coming that makes
this even easier to target, different variations.
MALE SPEAKER: So how about other platforms, like Glass or--
TOR NORBYE: I think those are all sort of the same use
case from us.
Like the IDE has certain ways of previewing Android resources
so those can be used on Wear.
And we have special support-- I mean,
I think one of the challenges for Wear
is they also have the round form factor, which is sort of just
difficult for tools to deal with, the fact
that it doesn't just-- like, hey,
this is not just a rectangular window.
You have to clip it with a circle.
But we have support for that.
And so I think Glass and Android TV
are sort of additional use cases, where, well, there's
this special module type and a special plug-in type.
And you just get to act as if it's
the exact same type of resource from a usability perspective.
MALE SPEAKER: So Android 5.0 Lollipop
is shipping to a number of devices as we speak.
TOR NORBYE: That's right.
MALE SPEAKER: Anything specific in terms
of support in Android Studio for that?
TOR NORBYE: Yes.
So there were a lot of new APIs, obviously, in every release.
But in this release, there's a lot of new support
to deal with animations.
And, for example, there's vectors,
and there's ripples, and all these new things.
And you need editor support for that.
And we have that.
Right.
So you get code completion in these new resource files.
We do XML validation.
So if you have a mistake, we'll tell you that.
We'll tell you if you are, for example, adding
a vector in a resource file that isn't Lollipop-specific,
because that could be a runtime crash.
So we have a lot of support for all the new editor APIs.
MALE SPEAKER: So you have a lot of support in terms of hints
or whatever you call those.
TOR NORBYE: That as well.
Yeah.
MALE SPEAKER: So for a lot of different things,
not just Lollipops.
If you add those to everything you already have,
is that the kind of information that could be available
and generated in the continuous build, for example?
Or is that surface-only in the IDE itself?
TOR NORBYE: No.
This-- well, I mean--
MALE SPEAKER: For somebody moving
to Android Studio, for example, or moving from a different tool
chain.
TOR NORBYE: That's right.
So some of the features are in Lint,
and those run from the command line.
So obviously, if you're running Lint in IDE,
you get quick fixes.
But if you run it on the command line,
you get an HTML report, for example.
So you can absolutely get that in the command line server.
Some of these features are obviously
going to be IDE-specific, for example, code completion.
But there's also some of these inspections,
which are running only in the IDE.
And the reason for that is that they're
taking advantage of a lot of IntelliJ-specific
specific support that we can't actually run outside the IDE.
So you definitely want to actually try it
in the IDE as well, not just from the command line.
MALE SPEAKER: Of course.
TOR NORBYE: Even no matter how much you love Emacs and Vi.
MALE SPEAKER: So we are talking about an IDE that
has not reached 1.0 just yet.
So what--
TOR NORBYE: Just yet.
MALE SPEAKER: Just yet.
OK.
Tell us more about it.
TOR NORBYE: We are getting extremely close.
So the current version number is 0.93.
And so, simple math, we're 0.7 away from 1.0.
And we don't generally want to do it that accurately.
But we are now really kind of considering
the next few builds release candidates.
MALE SPEAKER: So the beta release
was back at Google I/O in June.
TOR NORBYE: That's right.
MALE SPEAKER: And a number of things changed in terms of you
couldn't allow yourself to have block breaking changes.
What will change with 1.0?
TOR NORBYE: We've done that anyway.
MALE SPEAKER: You've done that.
TOR NORBYE: We've added-- our goal really
for 1.0 was to both be stable and feature complete.
And so we, for example, have changed the Gradle plug-in
quite a bit.
Like we've actually changed APIs,
which were a bit painful for our users.
That meant that if you were using
some of these early builds, you may have had to actually update
your build files as you got new versions of the IDE.
We plan to stop that at 1.0.
We want to make these APIs more stable.
And if we, for some reason, have to change them in the future,
we'll do more work to help migrate.
Right.
But we've also added some new features to address feedback.
Right.
So we have a brand-new AVD manager
that's going to try to make it easier
to set up an AVD, a virtual device that
is configured to run fast.
So we'll make sure that if you're on x86,
we'll use the x86 system image and all these things.
Right.
It was very easy in the past to accidentally
set up a very slow emulator.
And we're trying to streamline that.
And there's a number of other features
we've added as well to sort of address our 1.0 desires.
MALE SPEAKER: I have to say I'm quite impressed to see
how many people are using Android Studio already.
So that has to do with the fact that it's
built on this rock-solid base with IntelliJ.
TOR NORBYE: That's right.
I mean, let's not forget, even though it's a 1.0 product,
it is built on IntelliJ version 13.
It's a very, very solid IDE.
So I think the parts that we've done
that have sort of been tricky for us
is taking an external build system, Gradle,
and making that work as the build system in the IDE.
IDEs tend to be-- I don't say control freaks,
but that's kind of how they are.
Like, the IDE knows everything.
It knows how to build everything.
It knows what changed.
MALE SPEAKER: That's the deal.
TOR NORBYE: That is what IDEs do.
We have deliberately chosen not to do that,
to not have one implementation of the build system in Studio,
and another on the command line.
We're saying, we're always running Gradle.
And so we're working a lot on performance
in Gradle to make-- we're not quite where we want to be at.
I will be totally honest about that.
MALE SPEAKER: Well, it's a 1.0 version.
Performance is never really the biggest focus of a 1.0 version.
So maybe that's something--
TOR NORBYE: That's right.
And a lot of editing features are
happening with that compilation.
So if you were used to using Eclipse
or used to that-- it doesn't update the quick fixes until we
press Save, because that's when it runs its compilation.
IntelliJ does not work that way.
It is constantly-- the minute you pause editing,
it'll actually go and do its checking
and highlight errors for you.
Building is actually when you want to run.
MALE SPEAKER: Yeah.
TOR NORBYE: Yeah.
MALE SPEAKER: Great.
So 1.0 is around the corner.
Maybe by the time people see this, it will be out.
So go out and check for yourself.
TOR NORBYE: Depends on how soon this is.
But definitely we're hoping very, very soon.
MALE SPEAKER: OK.
Well, Tor, thanks a lot for spending the time.
TOR NORBYE: Thank you.
MALE SPEAKER: People, try it out and send feedback.
TOR NORBYE: Yes.
Report bugs, please.
MALE SPEAKER: Thank you.
Bye.