[MUSIC PLAYING]
VLAD RADU: Hello, everyone.
Thank you for still being with us.
I am Vlad.
DIANA WONG: I'm glad, too.
Oh, I'm Diana.
Sorry.
VLAD RADU: And we're going to talk to you, if you've not
heard about it already, about the 64-bit requirement
on Google Play.
Show of hands, who has heard of it?
OK, so not everyone.
Good to still talk about it.
We have recently introduced a requirement
that apps that are on Google Play support 64-bit.
Why did we do that?
Well, there's performance benefits
and there are security benefits.
And it's time that we take advantage of them.
By the way, Android has been supporting
64-bit for five years now.
Where we are.
We first announced it in late 2017.
We made the policy very clear in January of this year.
And starting August, we've enforced
that new apps and updates all have to support 64-bit.
If the app is managed code, Java or Kotlin, nothing to do.
Everything works.
If you have any native code, if you have 32-bit code,
you need to also have 64-bit code.
There are some exceptions.
They're well-publicized.
The most important one is for games
that have Unity 5.6 or older.
Those apps and games have until 2021
to provide a 64-bit variant.
Obviously, if you add more native code to your app,
that might increase the size of your APK.
The solution is don't use an APK.
Use an App Bundle.
The format allows you to upload everything
in one piece to Google Play, and then Google Play
will serve the right thing to the right device,
minimizing the size of the download.
If you don't know whether your app has native code or supports
64-bit--
that might happen for example, if you have an external library
that you're using that might be bringing native code
without you noticing--
on Google Play on the App Release page,
you will see that small notification telling you
that everything is fine or if not, it
will tell you exactly what version codes are problematic.
And now, on to Diana.
DIANA WONG: So how do you actually
become 64-bit compliant?
We consider it a four-step process.
The first is you can start by using APK analyzer in Android
Studio.
Basically, if you open to see what 32-bit dependencies
you have under the libraries for x86 and armeabi-v7a,
you can see your 32-bit dependencies.
You can next to a 64-bit build.
Most of the major game engines all support it now.
CMake, ndk-build, and Gradle, you can all target 64-bit.
Upgrade your SDKs and libraries.
In many cases, third-party library developers
have all released 64-bit versions of their libraries
to upgrade to, but you may need to contact those developers.
And then you can test locally, as well as on Google Play,
and then use testing tracks in order to see how it rolls out.
A couple of gotchas that we have experienced
or we have heard from developers that we just
wanted to walk through in order to get
the compiler on your side.
You may have seen this if you've done
64-bit migrations for other platforms or for your app.
The main one is that pointers no longer fit in 32 bits.
And especially things like jint are 32-bit only,
so you'll need to update those.
Our compiler flags-- these three--
can all help you identify the areas where you might still
be compiling to 32-bit.
Another gotcha or catch is around implicit function
declarations.
These are usually harmless, but basically
if you're not actually declaring what the function should be--
the type-- it will essentially assume int,
and then it will drop those extra 32 bits.
So you can find this class of error
with this handy compiler flag.
All of this is uploaded onto developer.android.com.
We have a full page on 64-bit, so you can actually
copy and paste these flags in.
And there are two more things, one of which
I don't have a slide for.
We've often heard issues with RenderScript
producing BC files.
And these .bc files are 32-bit only.
And this typically will show up if you're
using older build tools on versions before 21.
Basically, you'll need to upgrade your build tools
and tell it to delete the .bc files.
And those will solve your RenderScript issues.
And the last one is around MultiAPK.
So while we recommend you use App Bundles for 64-bit
to help reduce your code, you can use MultiAPK
and declare a max SDK version for APKs
that are older than 64-bit.
This is our [? DAQ ?] page 64-bit requirement,
which has all of this information and more,
so please go visit.
Done.
[APPLAUSE]
[MUSIC PLAYING]