在写JNI层代码时,当有AssetManager对象时,生成jni头文件报错:无法确定AssetManager的签名,网上搜的解决不了问题;
后来的解决办法为:
在CMakeLists中进行配置:
find_library(android-lib android) target_link_libraries( # Specifies the target library. native-lib # Links the target library to the log library # included in the NDK. ${android-lib} ${log-lib} )