react-native: [CRASH] Android 6.0.1 crashes with java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so

I uploaded a RN0.60.4 release build to Google Play and they ran automated tests leading to a lot of crashes coming in with the following stack trace:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName + 738(SoLoader.java:738)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName + 591(SoLoader.java:591)
       at com.facebook.soloader.SoLoader.loadLibrary + 529(SoLoader.java:529)
       at com.facebook.soloader.SoLoader.loadLibrary + 484(SoLoader.java:484)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit> + 20(HermesExecutor.java:20)
       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create + 27(HermesExecutorFactory.java:27)
       at com.facebook.react.ReactInstanceManager$5.run + 949(ReactInstanceManager.java:949)
       at java.lang.Thread.run + 818(Thread.java:818)

Affected OS is always 6.0.1. Interestingly Hermes is not even enabled in my build.gradle:

project.ext.react = [
  entryFile: "index.android.js",
  enableHermes: false,  // clean and rebuild if changing
  bundleInDebug: false,
  bundleInRelease: true,
  root: "../../",
 ]
...
def enableHermes = project.ext.react.get("enableHermes", false);
...
// Hermes config
    if (enableHermes) {
      def hermesPath = "../../node_modules/hermesvm/android/";
      debugImplementation files(hermesPath + "hermes-debug.aar")
      releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
      implementation jscFlavor
    }

I looked into the app bundle and extracted the apk for the device type that is crashing. It contains the libjsc.so file but not the libhermes.so. Imho this is correct because my gradle is configured to not include it. The big question is why does it want to load it if it not enabled? What also surprised me is that I found libhermes-executor-release.so and libhermes-executor-debug.so in it too. I guess, they should be excluded?

I filed a report with the Hermes project here but they referred me to here.

React Native version:

System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 88.63 MB / 32.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.16.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 26, 27, 28
      Build Tools: 23.0.1, 25.0.0, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3
      System Images: android-24 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: ^16.8.6 => 16.8.6
    react-native: ^0.60.4 => 0.60.4
  npmGlobalPackages:
    eslint-plugin-react-native: 3.5.0
    react-native-cli: 2.0.1
    react-native-git-upgrade: 0.2.7

Steps To Reproduce

  1. Upload an RN0.60.4 app bundle with crash reporting to Playstore
  2. check the crash reports

Describe what you expected to happen:

  • The Google Play devices should not crash.
  • Hermes library should not be loaded if disabled.
  • libhermes-executor-release.so and libhermes-executor-debug.so should not get bundled

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 54
  • Comments: 87 (2 by maintainers)

Commits related to this issue

Most upvoted comments

I was able to resolve it with a ./gradlew clean in the /android folder.

Fixed with changing SoLoader version to 0.8.2 according to 0.62 react-native configuration. https://github.com/facebook/react-native/blob/master/ReactAndroid/gradle.properties

    configurations.all {
        resolutionStrategy {
            force "com.facebook.soloader:soloader:0.8.2"
        }
    }

Having this issue too, when hermes disabled.

RN: 0.60.4

Device Brand: LGE Model: Nexus 5X Orientation: Portrait RAM free: 3.3 GB Disk free: 2.06 GB

Operating System Version: 6.0.1 Orientation: Portrait Rooted: Yes

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so at com.facebook.soloader.SoLoader.doLoadLibraryBySoName + 738(SoLoader.java:738) at com.facebook.soloader.SoLoader.loadLibraryBySoName + 591(SoLoader.java:591) at com.facebook.soloader.SoLoader.loadLibrary + 529(SoLoader.java:529) at com.facebook.soloader.SoLoader.loadLibrary + 484(SoLoader.java:484) at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit> + 20(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create + 27(HermesExecutorFactory.java:27) at com.facebook.react.ReactInstanceManager$5.run + 949(ReactInstanceManager.java:949) at java.lang.Thread.run + 818(Thread.java:818)

"couldn’t find DSO to load: libhermes.so " React Native Version: 0.61.2 enableHermes: false Still facing this issue

I’m having occasional crashes like this in production with hermes disabled also on 0.60.4

This is because SOLoader is absent.

Ensure

implementation'com.facebook.soloader:soloader:0.9.0+'

is added under dependencies in android/app/build.gradlle

clean your build cd android ./gradlew clean

Try bundling ./gradlew bundleRelease

Exit android folder cd ../

Try running npx react-native run-android --variant=release

received from crashlytics

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java)
       at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java)
       at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java)
       at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java)
       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java)
       at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java)
       at java.lang.Thread.run(Thread.java:760)
Brand: Xiaomi
Model: Redmi 4X
Orientation: Portrait
RAM free: 1.49 GB
Disk free: 18.04 GB
Version: 7.1.2
Orientation: Portrait
Rooted: No

I am also seeing this crash in production with RN 0.61.2, using android bundles with hermes disabled, on google nexus 5x

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)
       at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:952)
       at java.lang.Thread.run(Thread.java:818)
Brand: LGE
Model: Nexus 5X
Orientation: Portrait
RAM free: 3.12 GB
Disk free: 218.66 MB
Operating System
Version: 6.0.1
Orientation: Portrait
Rooted: Yes

Still happening to production users randomly on 0.61.5 with Hermes disabled building as a bundle.

I am also seeing this crash in production with RN 0.61.2, using android bundles with hermes disabled, on google nexus 5x

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)
       at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:952)
       at java.lang.Thread.run(Thread.java:818)
Brand: LGE
Model: Nexus 5X
Orientation: Portrait
RAM free: 3.12 GB
Disk free: 218.66 MB
Operating System
Version: 6.0.1
Orientation: Portrait
Rooted: Yes

I have the same issue with the same version of android.

My Crashlytics report:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libhermes.so at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738) at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484) at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:952) at java.lang.Thread.run(Thread.java:818)

Device Brand: LGE Model: Nexus 5X Orientation: Portrait RAM free: 3.18 GB Disk free: 495.84 MB Operating System Version: 6.0.1 Orientation: Portrait Rooted: Yes Crash Date: Nov 5, 2019, 5:05:00 PM App version: 2.3.2 (2320)

It worked for me in RN version 0.62.2 by adding to android/app/build.gradle:

implementation 'com.facebook.soloader: soloader: 0.9.0+'

Same issue as well, RN 0.61.2, hermes disabled, seeing the same crashes reported for Nexus 5X 6.0.1 after uploading the app bundle to Play Store alpha track. Interestingly enough, Robo tests on Firebase Test lab are successful for Nexus 5 (physical device with android 6.0.1) and Nexus 5X (virtual device with android 6.0.1). Has anybody managed to reproduce this on any physical device?

Same issues on Android 6.0.1 Any solution?

Fixed with changing SoLoader version to 0.8.2 according to 0.62 react-native configuration. https://github.com/facebook/react-native/blob/master/ReactAndroid/gradle.properties

    configurations.all {
        resolutionStrategy {
            force "com.facebook.soloader:soloader:0.8.2"
        }
    }

In which file do you apply this edit?

I’ve added it somewhere in the middle of the large android block of the android/app/build.gradle

How is react 60 stable I don’t understand.

I have had crashes for Device Brand: LGE Model: Nexus 5X React Native Version: 0.60.3 Android Version: 6.0.1

I had created android app bundle( .aab file ) with hermes enabled. I have only debug and release variant. release variant has this problem. Issue is opened on Aug 3 and it’s been so many days, not a single working fix is available. Really frustrating.

In my case I needed to add hermes path for each android build type

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
        qaImplementation files(hermesPath + "hermes-release.aar")
        stageImplementation files(hermesPath + "hermes-release.aar")
        prodImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }

Probably it should be mentioned in the doc, that it needs to be added for each build type.

same here, react-native 0.61.4

I’m having this same issue with the following conditions: -RN v0.63.4 -Hermes NOT enabled -> Using JSC -Latest SoLoader (0.10.1) -Using app bundle -Run gradle clean before bundleRelease -Issue only happens to certain devices on production (multiple Android versions and manufacturers)

After digging for a while I found this PR which mentions the “cause” of this issue when considering the previously mentioned conditions. The PR author does a really good job explaining how this problem occurs. In short, it’s not related to Hermes at all, but the real error is being discarded and Hermes is being loaded instead as a fallback, which in turn fails since it’s not enabled. That PR solves the “error swallowing” problem so the real error can be propagated when the app crashes. Please do merge that PR so we can figure out the real cause of this problem.

Any suggestion on how to reproduce for verification a given solution fixes this problem?

  • Google Play testing always reports fatal exception on Android 6.0.1, Nexus 5X devices
  • I cannot reproduce by copying APK to locally installed AVD:
    • Nexus 5X, Android 6.0 (Google APIs), API 23 )
    • Nexus 5X, Android 4.4 (Google APIs), API 19 )

Current Verification Procedure:

  1. Search StackOverflow, GitHub, etc. and make a suggested change to a build.gradle
  2. Upload AAB to Google Play
  3. Wait many hours until Google Play testing triggers a string of fatal exceptions and Firebase Crashlytics report emails notification to developer. Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
  4. Repeat at Step #1

I have tried enableHermes: false and various versions of resolution strategies for "com.facebook.soloader:soloader:0.9.0+ without success.

Why is it trying to load Hermes when enableHermes is set to false?

		"react-native": "0.60.6",
		"react-native-maps": "0.26.1",

Same issue none of the above solutions worked for me still a crash on Nexus5 6.0.1

@JmStefanAndroid Add configurations.all section to android > build.gradle > allprojects . This solved the issue for me. Plus, I run cd android ./gradlew clean before each release.

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        configurations.all {
            resolutionStrategy {
                // use 0.9.0 to fix crash on Android 11
                force "com.facebook.soloader:soloader:0.9.0+"
			}
		}

        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
}

any solutions?

@jsaraiva Ofcourse I run ./gradlew clean bundleRelease everytime for creating .aab file. I have now rolled out to Alpha with all the APKs along with universal apk for now.

I’m using hermes and RN 0.64.2 and android flavors

this combination works for me

android > build.gradle > allprojects

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        configurations.all {
            resolutionStrategy {
                // use 0.9.0 to fix crash on Android 11
                force "com.facebook.soloader:soloader:0.9.0+"
			}
		}

        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
}

  if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
        devImplementation files(hermesPath + "hermes-release.aar")
        prodImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }

then

cd android ./gradlew clean

and build again

this problem occurred while I upgrading from 0.59.4 to 0.61.0

in android/app/build.gradle I’ve added

project.ext.react = [
    //...
    enableHermes: true
]

def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);

and

dependencies {
    //...
    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
    //...
}

and it works 😃 hope this solution is useful for someone image

@jimmyceroneii After trying many, many solutions from around github/SO, the link you provided is what solved it for me.

https://stackoverflow.com/questions/61544046/android-java-lang-unsatisfiedlinkerror-couldnt-find-dso-to-load

EDIT: I also used soLoader version 0.9.0 instead of 0.8.2. Possibly due to using RN version 0.63.2

Upgraded to RN 0.62.2 and have the below crash in production

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libhermes.so at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789) at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525) at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:997) at java.lang.Thread.run(Thread.java:818)

Brand: Xiaomi Model: Mi 9X Orientation: Portrait RAM free: 19.19 GB Disk free: 14.78 GB Operating System Version: 5.1 Orientation: Portrait Rooted: Yes Date: Jun 22, 2020, 10:44:00 PM

Have this in my android/build.gradle maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") }

Any help on this would he really helpull.

Fixed with changing SoLoader version to 0.8.2 according to 0.62 react-native configuration. https://github.com/facebook/react-native/blob/master/ReactAndroid/gradle.properties

    configurations.all {
        resolutionStrategy {
            force "com.facebook.soloader:soloader:0.8.2"
        }
    }

Awesome. This fixed it for us 💪

But sadly this isn’t in React Native 0.62.2 as I discovered the issue after upgrading to it. The v0.63.0-rc.1 however already contains it , so I guess it will come soon.

As it is in the master here already I guess it is considered safe to upgrade the soloader to 0.8.2. Did anyone experience any issue because of it so far?

I added this in project gradle: it fixed my problem

allprojects { repositories { google() mavenLocal() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } maven { url 'https://maven.google.com' } } }

We are getting this error everytime we want to do a --variant=release build after doing a debug one. Doing /gradlew clean fixes it.

This and all the “couldn’t find DSO to load” bugs have been fixed in React Native 0.71.

The issue on previous versions was a “too aggressive” clean-up logic in the react.gradle file. In 0.71 the clean-up logic has been rewritten to be more Android friendly and is now living inside the React Native Gradle Plugin.

I’m closing this, please update to 0.71 and open a new issue if the “couldn’t find DSO to load” crash is still happening on 0.71+.

RN 0.62.2 here with hermes enabled. For me adding

configurations.all { resolutionStrategy { force "com.facebook.soloader:soloader:0.8.2" } }

to my top-level build.gradle and

implementation "com.facebook.soloader:soloader:0.8.2"

as well as

ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" }

to my app-level build.gradle did the trick. I think that especially the latter made the difference as before both apk’s and aab’s showed an additional (fifth) lib folder armeabi which did not contain all lib files, in particular not libhermes.so.

Important info if you use Hermes I updated from 61.5 to 62.2 and got a crash on android: couldn’t find DSO to load: libhermes-executor-debug.so

I fixed it by adding following string to android/app/build.gradle: implementation “org.webkit:android-jsc:+”

/android/gradlew clean told me clean was undefined for some reason. Manually deleting the /android/.gradle folder and rebuilding fixed it for me.

I had the same issue and was because I forget to update the (app/android)/buld.gradle, as say the documentation, I checked the changes with https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.61.5 and updated those files, also check the other files, but the important part is

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.facebook.react:react-native:+"  // From node_modules

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

Same issue:

React Native: 0.61.5 Brand: LGE Model: Nexus 5X SO: 6.0.1

Fatal Exception: java.lang.UnsatisfiedLinkError couldn’t find DSO to load: libhermes.so

com.facebook.soloader.SoLoader.doLoadLibraryBySoName (SoLoader.java)
com.facebook.soloader.SoLoader.assertInitialized (SoLoader.java)
com.facebook.soloader.SoLoader.assertInitialized (SoLoader.java)
com.facebook.soloader.SoLoader.assertInitialized (SoLoader.java)
com.facebook.hermes.reactexecutor.HermesExecutor.<clinit> (HermesExecutor.java)
com.facebook.hermes.reactexecutor.HermesExecutorFactory.create (HermesExecutorFactory.java)
com.facebook.react.ReactInstanceManager$5.run (ReactInstanceManager.java)
java.lang.Thread.run (Thread.java:818)

Android build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
    }
    repositories {
        google()
        jcenter()

        maven {
           url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.4.2")
        classpath 'com.google.gms:google-services:4.3.3'
     
        // Add dependency
        classpath 'io.fabric.tools:gradle:1.31.2'  // Crashlytics plugin

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        mavenLocal()
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

android/app/build.gradle

apply plugin: "com.android.application"
apply plugin: 'io.fabric'

crashlytics {
  enableNdk true
}

import com.android.build.OutputFile

project.ext.react = [
    entryFile: "index.js",
    enableHermes: true,  // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"

def enableSeparateBuildPerCPUArchitecture = true
def enableProguardInReleaseBuilds = true
def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);

def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.myapp"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 5
        versionName "1.0.2"
        missingDimensionStrategy 'react-native-camera', 'general'
        multiDexEnabled true              
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    signingConfigs {
        debug {
            storeFile file(rootDir.getCanonicalPath() + '/' + keystoreProperties['debugKeyStore'])
            storePassword keystoreProperties['debugStorePassword']
            keyAlias keystoreProperties['debugKeyAlias']
            keyPassword keystoreProperties['debugKeyPassword']
        }
        release {
            keyAlias keystoreProperties['releaseKeyAlias']
            keyPassword keystoreProperties['releaseKeyPassword']
            storeFile file(rootDir.getCanonicalPath() + '/' + keystoreProperties['releaseKeyStore'])
            storePassword keystoreProperties['releaseStorePassword']
        }                
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://facebook.github.io/react-native/docs/signed-apk-android.
            signingConfig signingConfigs.release
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }

        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.facebook.react:react-native:+"  // From node_modules

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply plugin: 'com.google.gms.google-services'

I’m seeing this crash in production with RN 0.61.2, using android bundles with hermes disabled, only on android 6 LGE devices.

Having the same issue, the project works fine on my local emulator but it gives the exact same error with @wsdt , any solutions yet?