随笔 - 632  文章 - 17  评论 - 54  阅读 - 93万

java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found: needed by

一、概述

  在AndroidStudio中集成opencv,使用其native函数时报的一个错误

 

二、解决办法

  opencv提供的native文件夹中提供的是动态库

  但是在gradle中的配置中,配置的stl是静态的,将其改为shared就行了

externalNativeBuild {
            cmake {
                cppFlags += "-frtti -fexceptions -std=c++11"
                arguments += "-DANDROID_STL=c++_shared"//改成这个
//                arguments += "-DANDROID_STL=c++_static"//这是原来的
            }
        }

 

posted on   飘杨......  阅读(975)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
历史上的今天:
2016-09-18 Application MyTest has not been registered. This is either due to a require() error during initialization or failure to call AppRegistry.registerComponent.
2016-09-18 npm命令总结
2013-09-18 android java.lang.StackOverflowError
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示