我使用Android Studio 2.2 cmake来构建本机代码,在本机代码中我调用了ffmpeg api,因此应该打包ffmpeg库.我CMakelists.txt的如下:
cmake_minimum_required(VERSION 3.4.1)
include_directories(libs/arm/include)
link_directories(libs/arm/lib/)
add_library( # Sets the name of the library.
native-lib
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
# Associated headers in the same location as their source
# file are automatically included.
src/main/cpp/native-lib.cpp )
find_library( # Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to …Run Code Online (Sandbox Code Playgroud)