Tommy Leong
Tommy Leong

Reputation: 3030

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)

Upvotes: 18

Views: 29080

Answers (2)

Chinedu Ofor
Chinedu Ofor

Reputation: 767

Run ./gradlew clean then build again. Reference

Upvotes: 8

Vadim Goroshevsky
Vadim Goroshevsky

Reputation: 1566

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

Upvotes: 6

Related Questions