aar文件中有一些SO文件,我希望在我的项目中使用这些文件。我应该如何写CMakeList.txt和build.gradle文件?
dependencies {
implementation 'example:example:1.7.11' // <--- SO file exists in this dependency
}
│ AndroidManifest.xml
│ classes.jar
│ R.txt
│
├─arm64-v8a
├─armeabi-v7a
├─jni
│ ├─arm64-v8a
│ │ libAK.so
│ │ libAKCompat.so
│ │
│ ├─armeabi-v7a
│ │ libAK.so <--- Suppose I need this document
│ │ libAKCompat.so
│ │
│ ├─x86
│ │ libAK.so
│ │
│ └─x86_64
│ libAK.so
│
├─x86
└─x86_64
cmake_minimum_required(VERSION 3.4.1)
add_library(example SHARED IMPORTED)
# How to set the value of example-file
set_target_properties(example
PROPERTIES IMPORTED_LOCATION
${example-file}) <---
target_link_libraries(myself_ndk_module example ${log-lib})