I put my_static_lib.h in src\main\include, and use it in other .c/cpp file like:#include "../include/features.h"我的 BIGGEST 错误是错过的:${CMAKE_SOURCE_DIR} CMake无法在 src/main/app/native-lib.c , SHARED 库很好的位置找到 STATIC 库 STATIC 库,这很奇怪.CMake cannot find STATIC library in locations like src/main/app/native-lib.c, SHARED library is OK, not STATIC library, which is very strange. 导入是必须的,我尝试将其替换为整个位置路径,将无法使用.And IMPORTED is a must, i tried replace it with the whole location path, won't work.谢谢所有的评论和答案,我希望这个答案能对像我这样的新手有所帮助.Thank you all the comments and answers, i hope this answer can help newbies like me. 这篇关于使用CMake将静态库(.a文件)添加到Android项目中,获取"CMake错误:CMake无法确定目标的链接器语言".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!