выполнение внешней нативной сборки для cmake - PullRequest
0 голосов
/ 07 июня 2018

cMakeLists.txt содержимое:

cmake_minimum_required(VERSION 3.4.1)

SET(CMAKE_CXX_FLAGS "-Wno-error=format-security -Wno-error=pointer-sign")


set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI})


add_library( # Sets the name of the library.
         native-camera2-lib

         # Sets the library as a shared library.
         SHARED

         # Provides a relative path to your source file(s).
         src/main/jni/native-camera2-lib.cpp )
include_directories(src/main/jni/)

find_library( # Sets the name of the path variable.
          log-lib

          # Specifies the name of the NDK library that
          # you want CMake to locate.
          log )

target_link_libraries( # Specifies the target library.
                   native-camera2-lib

                   # Links the target library to the log library
                   # included in the NDK.
                   ${log-lib} )

после запуска приложения на android studio.

FAILURE: сборка не удалась, исключение.13: 19: 19.936 [ОШИБКА] [org.gradle.internal.buildevents.BuildExceptionReporter] * Что пошло не так: 13: 19: 19.936 [ОШИБКА] [org.gradle.internal.buildevents.BuildExceptionReporter] Возникла проблема при настройке проекта ':приложение'.13: 19: 19.936 [ОШИБКА] [org.gradle.internal.buildevents.BuildExceptionReporter]> выполнение внешней встроенной сборки для cmake D: \ AndroidStudioProjects \ camerandk \ app \ src \ main \ jni \ CMakeLists.txt 13: 19: 19.936 [ОШИБКА] [org.gradle.internal.buildevents.BuildExceptionReporter]

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...