production

ReactNative and Android: 64 bit

Prologue.

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

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

Listlinkblog trade mission

LITSLINK is Going on Trade Mission to Norway!

LITSLINK will join the Export Promotion Office of Ukraine on the Trade Mission to Norway. We are honored to represent our country and join the global community of IT leaders. As an award-winning software development company, we always strive to keep up with the growing trends on the market, collaborate with international players and contribute t...
Read more
Machine learning

An Introduction to Machine Learning Algorithms

Machine Learning is becoming more and more predominant in the technology sector. It is vital for everyone who is related to the industry to know how machines can learn on their own. Simply speaking, they do it by using algorithms to manipulate data in certain ways−making predictions about the future, providing insights, and learn from it. That i...
Read more
Voice technology ai app 2

How Voice Technology Can Level Up Your App?

If you’ve been wondering whether voice technology worth attention or it is a flash in the pan, the answer has already been found. Even the most skeptical users have to admit voice-based solutions are gathering pace even faster than it was expected. With more than 35 million users in the United States, Alexa, Siri and Cortana have become new frie...
Read more