Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not providing "Findncnn.cmake" in CMAKE_MODULE_PATH #43

Open
yuqing-liu-dut opened this issue Sep 8, 2022 · 3 comments
Open

Not providing "Findncnn.cmake" in CMAKE_MODULE_PATH #43

yuqing-liu-dut opened this issue Sep 8, 2022 · 3 comments

Comments

@yuqing-liu-dut
Copy link

您好,在搭建Demo过程中,我下载并使用了官网的预编译库,在Android Studio中运行后报以下错误:

By not providing "Findncnn.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ncnn", but
CMake did not find one.

请问是什么原因?要如何解决?

@liruichao-eon
Copy link

liruichao-eon commented Sep 9, 2022

CMakeLists.txt
set中需要提供ncnn-{version}-android-vulkan正确的路径
https://github.com/Tencent/ncnn/releases

@wfpurgator
Copy link

CMakeLists.txt set中需要提供ncnn-{version}-android-vulkan正确的路径 https://github.com/Tencent/ncnn/releases

路径正确了,cmake只构建了v7a和x86;构建v8a就直接报这个错误了((

@wfpurgator
Copy link

问题解决了,需要令NDK编译适应各种CPU架构,在src/build.gradle文件里面加入
defaultConfig {
applicationId "com.tencent.MobileUnet"
archivesBaseName = "$applicationId"
//cpu兼容
ndk {
moduleName "ncnn"
abiFilters "arm64-v8a","x86"
}

    minSdkVersion 24
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants