安卓报错,好像和cmake有关

问题遇到的现象和发生背景

安卓项目报错: The C compiler is not able to compile a simple test program.

用代码块功能插入代码,请勿粘贴截图
运行结果及报错内容

img

img

1.可能是你的cmake脚本写的有问题
2.ndk 21版本确实有点问题,你可以换成23版本试试

参考下下面两篇博客
https://blog.csdn.net/fengbingchun/article/details/115823589
https://blog.csdn.net/shanpenghui/article/details/109044706