将RN集成到现有工程闪退,报错java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libgnustl_shared.so



  • 如题,按照官方文档把RN集成到现有工程后,启动MyReactActivity页面闪退,报错java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libgnustl_shared.so。
    按照博客提供的解决办法,在app的build.gradle中添加:
    packagingOptions {
    exclude "lib/x86/libgnustl_shared.so"
    exclude "lib/armeabi-v7a/libgnustl_shared.so"
    exclude "lib/armeabi/libgnustl_shared.so"
    exclude "lib/x86_64/libgnustl_shared.so"
    exclude "lib/arm64-v8a/libgnustl_shared.so"
    exclude "lib/mips/libgnustl_shared.so"
    exclude "lib/mips64/libgnustl_shared.so"
    }
    在app的gradle.properties 最后添加 android.useDeprecatedNdk=true
    也没有解决问题,若有大神遇到过此问题,麻烦指点一下迷津,非常感谢!


Log in to reply