Android java.lang.UnsatisfiedLinkError: couldn't find DSO to load

前端 未结 1 840
耶瑟儿~
耶瑟儿~ 2020-12-11 06:11

I just set up a brand new react-native project (0.62). Running a fresh debug build works just fine.

I set up signing following the documentation: https://reactnative

相关标签:
1条回答
  • 2020-12-11 06:41

    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
    }
    
    

    perform below steps if the above steps are not working

    app/build.gradle.

    android {
      ...
      // add the following packagingOptions 
      packagingOptions {
        pickFirst 'lib/x86_64/libjsc.so'
        pickFirst 'lib/arm64-v8a/libjsc.so'
      }
    }
    

    We also added the following to the defaultConfig in the app/build.gradle

    ndk {
      abiFilters 'armeabi-v7a', 'x86'
    }
    
    0 讨论(0)
提交回复
热议问题