ReactNative and Android: 64 bit

Prologue.

A lot of developers received an email from Google about changes in Google Play Marker.

Starting from August 1, 2019 Google Play will accept only 64-bit version of the application, so if you are lucky and have Android application written on Java or Kotlin—you can skip this article, otherwise—read further…

You can read more here in Google Blog.

DO NOT PANIC! I will explain what you need to do.

Episode 1. Small revision for the latest news.
  • Changes in 2019:

Google is trying to move all mobile applications (except games written on Unity) to 64-bit support.

If you do not perform any actions:
- your application will still be available in the Google Play Market
- all updates that not support 64-bit will be ignored

That means that you will not be able to update an application unless you add a 64 bit support version.

  • Changes in 2021:

All applications that do not support a 64-bit version will not be available in the Google Play Market (including games written on the Unity engine)

  • Exceptions:

1. Applications that are running on Android 8 Oreo or earlier do not need 64- bit support
2. Android TV and Wear OS do not need 64-bit support (but that’s not quite ReactNative side, duh)

Episode 2. What to do?

Thank you Facebook and ReactCommunity! As of March 12, 2019, ReactNative has a new version release 0.59.

You can read the ReactNative 0.59 release notes here.

Yes, they added hooks, but the important thing here is 64-bit support on Android.

Sooo, the first and only step that you need to do is to update you ReactNative version to 0.59 or higher.

Follow the official guide for update here to upgrade ReactNative.

Steps are pretty simple:

1. Just run:

react-native upgrade <version> 

2. Resolve a conflict via git and x86! And everything is ready

When you are done, let’s walk through the thing that should be in your ReactNative project.

We need to take a look on our ABI (Application Binary Interface) manager in Android project; basically these are directives to a device of what instruction set it should use. Take a look at the file /android/app/build.gradle, we are interested in abiblock:

android {
    ...
    splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
    ...
}

IMPORTANT. Insure that in include you have "arm64-v8a" and "x86-64".

Let’s walk through the ABI manager config to find out what’s happening there:

• armeabi-v7a and x86—support of instruction sets on x86 (32-bit) CPUs

• arm64-v8a and x86-64— instruction sets for 64-bit CPUs

Thanks to these directives, we are telling our application that it can run on 32 and 64-bit CPUs.

Epilogue

I know that the ReactNative update can be painful, but new specifications of the Google Play Market are making us actualize our projects. In the end, thanks to these changes, you will still have a good performance boost and hooks in your ReactNative project, so it is not high price to pay

Have a great time!

Share:

Latest posts

React native

Use React Native, be like Jean-Claude Van Damme*

A lot of us have seen the creative advertisement from Volvo in which Mr. van Damme demonstrates his agility. In this article, we would like to demonstrate how React Native technology kills two birds with one stone in the cross-platform mobile software development, no matter what kind of company you are: a startup, mid-sized or big company. Mean...
Read more
Img 1530

ReactNative and Android: 64 bit

Prologue. A lot of developers received an email from Google about changes in Google Play Marker. Starting from August 1, 2019 Google Play will accept only 64-bit version of the application, so if you are lucky and have Android application written on Java or Kotlin—you can skip this article, otherwise—read further… You can read more here in Go...
Read more
Topcompany

LitsLink Among the Leading Companies at GoodFirms

LitsLink earns a reputation among the industry-leading software companies, for its expertise in technologies like Node.Js at GoodFirms, which is a leading B2B research and review platform. About LitsLink LitsLink is a software and app development company that crafts bespoke solutions for clients worldwide with its HQ in Palo Alto, CA and R&a...
Read more