dlopen failed: library "libopencv_java4.so" not found
Android studio编译yolov5时报错,
最后解决方法:
app所在目录的build.gradle修改:
指向opencv 的库arm64-v8a所在的父目录,报错就解决了。
externalNativeBuild {
cmake {
version "3.10.2"
path file('src/main/jni/CMakeLists.txt')
}
}
sourceSets {
main {
jniLibs.srcDirs = ['src/main/jni/opencv'] // libs
}
}
build.gradle完整代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.tencent.yolov5ncnn"
archivesBaseName = "$applicationId"
externalNativeBuild {
cmake {
cppFlags ""
//
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/jacke121/article/details/123302840
内容来源于网络,如有侵权,请联系作者删除!