2017-04-06 40 views
0

我有一個工作的C++庫,使用cmake在mac上編譯並已在運行。我現在正在嘗試使用Android Studio和Gradle爲Android進行編譯。
當我嘗試編譯採用Android工作室我得到一個神祕的鏈接錯誤,所以我嘗試使用gradle這個包裝器來編譯它的命令行,然後我得到了以下錯誤的:建築圖書館與Android的OpenCV失敗「不建立目標XXX,因爲它沒有建立命令」

externalNativeBuildRelease: not building target opencv_calib3d because there was no build command for it 
externalNativeBuildRelease: not building target opencv_core because there was no build command for it 
externalNativeBuildRelease: not building target opencv_features2d because there was no build command for it 
externalNativeBuildRelease: not building target opencv_flann because there was no build command for it 
externalNativeBuildRelease: not building target opencv_highgui because there was no build command for it 
externalNativeBuildRelease: not building target opencv_imgcodecs because there was no build command for it 
externalNativeBuildRelease: not building target opencv_imgproc because there was no build command for it 
externalNativeBuildRelease: not building target opencv_ml because there was no build command for it 
externalNativeBuildRelease: not building target opencv_objdetect because there was no build command for it 
externalNativeBuildRelease: not building target opencv_photo because there was no build command for it 
externalNativeBuildRelease: not building target opencv_shape because there was no build command for it 
externalNativeBuildRelease: not building target opencv_stitching because there was no build command for it 
externalNativeBuildRelease: not building target opencv_superres because there was no build command for it 
externalNativeBuildRelease: not building target opencv_video because there was no build command for it 
externalNativeBuildRelease: not building target opencv_videoio because there was no build command for it 
externalNativeBuildRelease: not building target opencv_videostab because there was no build command for it 
... 

我做不到找到這個問題的解釋。
我的CMakeLists.txt包括線:

set (OpenCV_DIR /usr/local/Cellar/opencv3/HEAD-876c2c0_4/share/OpenCV) 
set (CMAKE_MODULE_PATH /usr/local/Cellar/opencv3/HEAD-876c2c0_4/share/OpenCV) 
find_package(OpenCV REQUIRED) 

,它似乎找到它,但不能建立它。如果任何人有任何想法如何解決這個問題,我將不勝感激。

回答

相關問題