Android 使用 cmakelists.txt时 如何加载 类似 @2.0.so结尾的 so文件?
使用Android studio 开发NDK,载入了aosp里面的so文件,运行的时候报找不到 android.hardware.graphics.allocator@2.0.so 文件
在cmakelists.txt中增加了
add_library( android.hardware.graphics.allocator@2.0
SHARED
IMPORTED )
set_target_properties( android.hardware.graphics.allocator@2.0
PROPERTIES IMPORTED_LOCATION
${jniLibs_DIR}/${ANDROID_ABI}/android.hardware.graphics.allocator@2.0.so )
target_link_libraries 也增加了 android.hardware.graphics.allocator@2.0
编译的时候就出错,改成android.hardware.graphics.allocator 就能编译通过,但是运行时找不到android.hardware.graphics.allocator@2.0.so, 请问下cmakelists 如何加载这个so文件呢