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

Cross platform mobile tools

Best Cross-platform Mobile Development Tools In 2019

If you want to conquer the mobile application market with your software product, you need to build such an app that will be both engaging and enjoyed by a wide variety of users. Creating an appealing, useful, and eye-catching mobile product is only one side of your success story. Another important aspect is the technical part — how your app runs...
Read more
What is mvp

What is MVP and How Much Time Does It Take to Build It?

How many times did you have an incredible idea for an app and missed a chance to make it work? Whenever we spend hours in a bank or waste time for finding the right item in a store, we dream of software that would make these tasks much easier. While you are toying with the idea of establishing your own business, somebody has already done it.  G...
Read more
Vr in education.

Usage of Virtual Reality in Education: Pros and Cons

Virtual reality is a modern technology enabling the three-dimensional, computer-generated environment that users may explore and interact with. In this way, simulated environments come alive and can be perceived by the human senses (mostly by, hearing and eyesight). Virtual Reality enriches the user experience and gives them a special ‘near-life...
Read more
Btn scroll top 4x2