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

Android Example编译问题 #157

Closed
enduringstack opened this issue Oct 11, 2017 · 6 comments
Closed

Android Example编译问题 #157

enduringstack opened this issue Oct 11, 2017 · 6 comments

Comments

@enduringstack
Copy link

按照这个链接的描述去编译:
https://github.com/Tencent/ncnn/wiki/cmake-%E6%89%93%E5%8C%85-android-sdk
执行:

cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake
-DANDROID_ABI="armeabi-v7a with NEON"
-DANDROID_NATIVE_API_LEVEL=android-8
-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.8
-DANDROID_STL_FORCE_FEATURES=OFF ..

后,报了这个错误:
/ncnn-master/build# cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DANDROID_NATIVE_API_LEVEL=android-8 -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.8 -DANDROID_STL_FORCE_FEATURES=OFF ..
-- CMAKE_TOOLCHAIN_FILE = /root/chenfuduo/ncnn-master/android.toolchain.cmake
-- CMAKE_INSTALL_PREFIX = /root/chenfuduo/ncnn-master/build/install
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/root/chenfuduo/ncnn-master/build/CMakeFiles/CMakeOutput.log".

我的NDK是r10b,ubuntu 14.04,cmake 是3.10,请问还需要配置什么吗?

@nihui
Copy link
Member

nihui commented Oct 11, 2017

没有 make ?

@enduringstack
Copy link
Author

已解决,换了不是root账号的用户可以了

@nihui
Copy link
Member

nihui commented Dec 25, 2017

cmake 3.10 修改了 make 的寻找逻辑,使用 cmake 3.9 应该 ok

@nihui nihui reopened this Dec 25, 2017
@xingjinglu
Copy link

xingjinglu commented Feb 28, 2018

export ANDROID_NDK=~/software/android-ndk-r14b
cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake    -DANDROID_ABI="arm64-v8a"  -DANDROID_PLATFORM=android-21 ..
-- CMAKE_TOOLCHAIN_FILE = ~/software/ncnn/android.toolchain.cmake

出现如下错误:
-- CMAKE_TOOLCHAIN_FILE = /search/speech/luxingjing/software/ncnn/android.toolchain.cmake
-- CMAKE_INSTALL_PREFIX = /search/speech/luxingjing/software/ncnn/build-android-aarch64/install
CMake Error at android.toolchain.cmake:623 (message):
Could not find any working toolchain in the NDK. Probably your Android NDK
is broken.
Call Stack (most recent call first):
/usr/local/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:15 (project)

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

@northeastsquare
Copy link

在windows8 上编译ncnn android版本,出现这个错误,使用cmake3.9,没有解决问题@nihui

@northeastsquare
Copy link

northeastsquare commented Feb 13, 2020

终于好了, 根据这里 https://discourse.urho3d.io/t/android-solved-android-build-on-windows-cmake-error/240/2

把make的文件夹加入path,就可以了
@xingjinglu

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

4 participants