Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

E/SoLoader: couldn't find DSO to load: libjscexecutor.so

I'm trying to upgrade my ReactNative application to RN0.59.9. As usual, everything works fine on iOS (manage to build as 64bit) side but Android is not letting me go.

I'm able to build and generate a debug variant artifact, however my app crash after splash screen due to libjscexecutor.so.

What I've tried:

  1. Unzip the apk to check the Lib folder, whether 32bit and 64bit has the same amount of *.so files (All of [arm64-v8a/armeabi-v7a/x86/x86_64] has the same files, only [armeabi] is different. [armeabi] holds only a single *.so file)
  2. Tried to build only 32bit application, however I face the same issue even in 32bit application
  3. Remove node_modules, yarn cache clear, yarn install

My environment(Things you probably want to know?):

  1. NDK-r19c
  2. build-gradle3.3.0
  3. gradle-4.10.1

Below is the logcat from Android Studio:

2019-06-10 17:09:29.754 23343-23665/com.bundle.id E/SoLoader: couldn't find DSO to load: libjscexecutor.so
2019-06-10 17:09:29.755 23343-23665/com.bundle.id E/AndroidRuntime: FATAL EXCEPTION: create_react_context
    Process: com.bundle.id, PID: 23343
    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.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.react.jscexecutor.JSCExecutor.<clinit>(JSCExecutor.java:19)
        at com.facebook.react.jscexecutor.JSCExecutorFactory.create(JSCExecutorFactory.java:29)
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:944)
        at java.lang.Thread.run(Thread.java:764)
like image 757
TommyLeong Avatar asked Jun 10 '19 09:06

TommyLeong


Video Answer


2 Answers

Run ./gradlew clean then build again. Reference

like image 155
Chinedu Ofor Avatar answered Sep 28 '22 03:09

Chinedu Ofor


Just upgrade the SOLoader.

In android/app/build.gradle:

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

More details and discussion here: https://github.com/facebook/react-native/issues/25537

like image 27
Vadim Goroshevsky Avatar answered Sep 28 '22 02:09

Vadim Goroshevsky