Android ReactNative java.lang.UnsatisfiedLinkError:could find DSO to load: libreactnativejni.so

后端 未结 9 1779
天命终不由人
天命终不由人 2020-12-15 17:21

I have been trying to add ReactNative to my existing android application. I followed the instructions from this link. I could add it but the app gets crashed once I open the

相关标签:
9条回答
  • 2020-12-15 17:53

    you can use the old version of soloader by adding configurations.all into your build.gradle

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

    like this

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
        repositories {
            google()
            jcenter()
    
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.5.0'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    configurations.all {
        resolutionStrategy {
            force "com.facebook.soloader:soloader:0.8.2"
        }
    }
    
    allprojects {
        repositories {
            google()
            jcenter()
    
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    

    reference https://stackoverflow.com/a/61695629/8079868

    0 讨论(0)
  • 2020-12-15 17:56

    It might be lib\x86_64\libreactnativejni.so not found due to missing strip tool for ABI 'X86_64' Try the following steps.

    1. Uninstall the apk
    2. Clean the android folder

      • Navigate to android folder cd android.

      • Clean the directory using gradle

      • For Windows, gradlew clean

      • For Linux, ./graldew clean
    3. Now you can try react-native run-android --no-jetifier

    0 讨论(0)
  • 2020-12-15 17:58

    To me what worked was to clean project build and build it again.

    0 讨论(0)
提交回复
热议问题