小编ton*_*yye的帖子

Android Studio 2.2不会将第三方库打包到apk

我使用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)

android cmake android-studio

10
推荐指数
1
解决办法
2230
查看次数

标签 统计

android ×1

android-studio ×1

cmake ×1