[Android error] couldn't find DSO to load: libjscexecutor.so

yunjeong·2021년 7월 29일
0

에러 발생 당시 React-Native Version
:: react-native@0.63.4 | MIT | deps: 27 | versions: 559

npm install hermesvm
npm install jsc-android

npm 또는 yarn으로 패키지를 설치한 후 하단 코드 존재 여부 확인 및 추가


build.gradle (Project)

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")
        }

        google()
        jcenter()
   }
}


build.gradle (app)

project.ext.react = [
    entryFile: "index.js", ///해당 라인 추가...
    enableHermes: false,  // clean and rebuild if changing
]

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

추가로 minSdkVersion도 문제일까 싶어 20이상으로 수정해주었다.

그리고 해결!

참고한 링크

https://github.com/facebook/react-native/issues/25537

profile
거침없이 한 달음에!

0개의 댓글