MegEngine / MegEngine

MegEngine 是一个快速、可拓展、易于使用且支持自动求导的深度学习框架
https://megengine.org.cn/
Apache License 2.0
4.77k stars 543 forks source link

More than one file was found with OS independent path 'lib/arm64-v8a/libshufflenet_inference.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake #94

Closed aspnetcs closed 4 years ago

aspnetcs commented 4 years ago

请简要描述您的需求

More than one file was found with OS independent path 'lib/arm64-v8a/libshufflenet_inference.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

android 如何解决

cheekyshibe commented 4 years ago

请尝试添加以下规则,默认选择第一个找到的路径:

android {
......
    packagingOptions {
        pickFirst 'lib/arm64-v8a/libshufflenet_inference.so'
    }
}

Refs:

cheekyshibe commented 4 years ago

这个问题属于 Android 相关的环境设置,与 MegEngine 本质无关,可能会被添加 invalid 标签,

aspnetcs commented 4 years ago

不管用的,

packagingOptions { pickFirst 'lib/arm64-v8a/libshufflenet_inference.so' }

确实管用,成功了!