Android混合开发问题
来源:16-7 React Native 混合开发实战(Android篇)-5【解锁新的开发方式】
安卓android4132948
2020-04-22
2020-04-22 11:59:48.617 31574-31618/com.xj.rnbearinandroid E/AndroidRuntime: FATAL EXCEPTION: create_react_context
Process: com.xj.rnbearinandroid, PID: 31574
java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libhermes.so
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525)
at com.facebook.hermes.reactexecutor.HermesExecutor.(HermesExecutor.java:20)
at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:997)
at java.lang.Thread.run(Thread.java:764)
2020-04-22 11:59:48.817 31574-31612/com.xj.rnbearinandroid E/SoLoader: couldn’t find DSO to load: libc++_shared.so caused by: dlopen failed: “/data/data/com.xj.rnbearinandroid/lib-main/libc++_shared.so” has unexpected e_machine: 40 (EM_ARM)
2020-04-22 11:59:48.821 31574-31612/com.xj.rnbearinandroid E/SoLoader: couldn’t find DSO to load: libglog.so caused by: APK was built for a different platform
2020-04-22 11:59:48.824 31574-31612/com.xj.rnbearinandroid E/SoLoader: couldn’t find DSO to load: libglog_init.so caused by: couldn’t find DSO to load: libglog.so caused by: APK was built for a different platform
2020-04-22 11:59:48.826 31574-31612/com.xj.rnbearinandroid E/SoLoader: couldn’t find DSO to load: libreactnativejni.so caused by: couldn’t find DSO to load: libglog_init.so caused by: couldn’t find DSO to load: libglog.so caused by: APK was built for a different platform
react-native版本:
“dependencies”: {
“react”: “16.11.0”,
“react-native”: “0.62.2”
},
是react-native版本的问题还是什么原因,如果是版本的问题怎么在0.6版本上进行适配
1回答
-
CrazyCodeBoy
2020-04-23
RN版本不同配置也不同,上述问题由未正确配置配置hermes导致的,参考下:
https://www.devio.org/2020/04/19/React-Native-Hybrid-Android/#couldnt-find-dso-to-load-libhermesso
122023-02-23