React native expection java.lang.UnsatisfiedLinkError: dlopen failed: “/data/data/{package}/lib-main/libgnustl_shared.so” is 32-bit instead of 64-bit

我的未来我决定 提交于 2019-11-28 12:02:50

Add the following into app/gradle file

defaultConfig {
....

    ndk {
        abiFilters "armeabi-v7a", "x86", 'armeabi', 'arm64-v8a'
    }

    packagingOptions {
        exclude "lib/arm64-v8a/libgnustl_shared.so"
    }
}

also make sure you working with the same port.

adb reverse tcp:8081 tcp:8081

It can also help you: build.gradle (app)

android{
   ...
   defaultConfig {
      ....
      ndk {
        abiFilters "armeabi-v7a", "x86", 'armeabi', 'arm64-v8a'
      }
      packagingOptions {
               exclude "lib/arm64-v8a/libgnustl_shared.so"
               exclude '/lib/mips64/**'
               exclude '/lib/arm64-v8a/**'
               exclude '/lib/x86_64/**'
      }
      ...
   }
}

React Native doesn't provide 64-bit version of the native code and the system always fall back to 32-bit. They have resolved this issue and is scheduled to be part of the RN 0.59 release Ref: https://github.com/facebook/react-native/issues/2814#issuecomment-457644191

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!