sdk 10升级sdk 11后,加载链接的so库崩溃
升级到sdk11后,崩溃:
01-30 23:30:17.152 5812-5812 C03f00/MUSL-LDSO com.examp…lication E Error loading shared library /Users/DevEcoStudioProjects/MyApplication5/entry/build/default/intermediates/cmake/default/obj/arm64-v8a/liblogging.so: (needed by /data/storage/el1/bundle/libs/arm64/libentry.so)
01-30 23:30:17.152 5812-5812 C03f01/NAPI com.examp…lication W [(native_module_manager.cpp:764)(LoadModuleLibrary)] dlopen failed: Error loading shared library /Users/DevEcoStudioProjects/MyApplication5/entry/build/default/intermediates/cmake/default/obj/arm64-v8a/liblogging.so: Invalid argument (needed by /data/storage/el1/bundle/libs/arm64/libentry.so)
01-30 23:30:17.152 5812-5812 C03f01/NAPI com.examp…lication E [(native_module_manager.cpp:728)(LoadModuleLibrary)] primary module path is empty
01-30 23:30:17.152 5812-5812 C03f01/NAPI com.examp…lication E [(native_module_manager.cpp:781)(GetFileBuffer)] is not existed.
01-30 23:30:17.152 5812-5812 C03f01/NAPI com.examp…lication E [(native_module_manager.cpp:857)(FindNativeModuleByDisk)] all path load module ‘entry’ failed
发现该问题在mac电脑发生,原因是mac下面少了个OHOS.cmake文件。将旧版本的该文件拷贝过来,问题即可解决。