
我一直在尝试将ReactNative添加到我现有的android应用程序中.我遵循了this链接中的说明.我可以添加它,但是一旦打开react native活动,应用程序就会崩溃.我已经开始使用服务器
adb reverse tcp:8081 tcp:8081并开始使用本机
react-native start我得到一个对话框,提示Js文件正在加载.但是最后以崩溃告终.以下是在logcat中打印的错误:
java.lang.UnsatisfIEdlinkError: Couldn't find DSO to load: libreactnativejni.so at com.facebook.soloader.soLoader.loadlibraryBySoname(Soloader.java:213) at com.facebook.soloader.soLoader.loadlibrary(Soloader.java:178) at com.facebook.react.brIDge.JsCJavaScriptExecutor.<clinit>(JsCJavaScriptExecutor.java:19) at com.facebook.react.ReactInstanceManager.onjsBundleLoadedFromServer(ReactInstanceManager.java:413) at com.facebook.react.ReactInstanceManager.createReactContextInBackground(ReactInstanceManager.java:236)我完全迷路了,因为我无法找出导致此问题的原因.
提前致谢.
解决方法:
这是由以下问题引起的(开放2年)https://github.com/facebook/react-native/issues/2814
从问题:
React Native on AndroID doesn’t provIDe a 64-bit version of the
libreactnativejni.sonative library, which can cause compatibility issues on 64-bit devices. I ran into this while attempting to integrate React Native with a large existing application I’m develoPing.
来自Facebook的反应:
“Thanks for reporting! Yes we don’t provIDe 64-bit version of the native code and the system should always fall back to 32-bit.“
And:
“Most AndroID projects use a number of 3rd-party librarIEs, and any that include native 64-bit code will cause React Native to fail.“
以下SO回答Use 32-bit jni libraries on 64-bit android解释了回退到32位库以及您无法混合使用的事实.因此,如果找到64位,则所有都应为64位
我建议阅读Github问题#2814.建议了多个修复程序,但是哪种方法有效取决于您的情况.
发行人还写了一个博客:Mixing 32- and 64-bit Dependencies in Android
希望这可以帮助!
总结以上是内存溢出为你收集整理的Android ReactNative java.lang.UnsatisfiedLinkError:可以找到要加载的DSO:libreactnativejni.so全部内容,希望文章能够帮你解决Android ReactNative java.lang.UnsatisfiedLinkError:可以找到要加载的DSO:libreactnativejni.so所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)