The introduction of Android 5.0 back in 2014 brought official support for 64-bit CPUs. This is a great advancement in Android as 64-bit CPUs deliver great performance improvements for all users running apps. Earlier this year, Google announced that Android apps which include native code, such as Xamarin apps, must also provide a 64-bit version starting in August 2019.
Support for 64-bit
If your app needs updating, you may have received an email from Google looking similar to this:
Alternatively, you may not have received this email or only saw a few of your apps. This is due to Xamarin.Android having supported 64-bit CPU architectures for some time and is the default in Visual Studio 2019. In fact, you may already be shipping a 64-bit version of your app based on the Application Binary Interfaces (ABIs) that were selected when building your Release.
Four Types of ABIs
There are four ABIs that can be selected when building your mobile app:
- armeabi-v7a – ARM-based CPUs with hardware floating-point operations and multiple CPU (SMP) devices.
- arm64-v8a – CPUs based on the 64-bit ARMv8 architecture.
- x86 – CPUs that support the x86 (or IA-32) instruction set.
- x86_64 – CPUs that support the 64-bit x86 (also referred to as x64 and AMD64) instruction set.
Select which ABIs your application supports in the project properties. Remember that any native libraries your application uses will receive an optimized version for each ABI selected.
Visual Studio 2019
In Visual Studio 2019 the ABIs are found in Project Properties -> Android Options -> Advanced.
Visual Studio for Mac
In Visual Studio 2019 for Mac the settings are found in Project Options -> Android Build -> Advanced.
At a minimum, your Android application should ship with armeabi-v7a selected while adhering to Google’s new 64-bit policy. It should also ship with arm64-v8a starting on August 1st, 2019. Remember to assemble this on your Release configuration in order to take effect when shipping to the Google Play Store.
Timeline
Be sure to check the official 64-bit support timeline for roadmap updates.
Learn More
Get more insight into the many different flavors of architectures that Xamarin.Android supports. Read through our documentation on multi-core devices support. Additionally, check out the full documentation on configuring your Xamarin.Android app for release.
I thought the whole point of the article is to “Preparing Android Apps for Google Play’s 64-bit Requirements”, yet under ABI’s it just says “Select which ABIs your application supports in the project properties” which is kind of vague. I already have arm64-v8a selected yet Google is still complaining. Is it necessary to actually remove “x86” and possibly one or more of the others?
Hey there Gerry! So if you ship and arm version then you need to select arm64-v8a as well. If you ship an x86 version you must also ship an x86_64 version as well.