Mr.Alright---AndroidStudio创建C++ NDK支持报错CMake Error: The following variables are used in this project

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
-- Configuring incomplete, errors occurred!
Please set them or make sure they are set and tested correctly in the CMake files:
See also "E:/asProject/TestC/app/.externalNativeBuild/cmake/release/x86_64/CMakeFiles/CMakeOutput.log".
log-lib
linked by target "native-lib" in directory E:/asProject/TestC/app
See also "E:/asProject/TestC/app/.externalNativeBuild/cmake/release/x86_64/CMakeFiles/CMakeError.log".

什么鬼?我就创建个项目就直接报错了?AS还行不行啊?一万个草泥马奔腾而过!!!
于是Google了一下,发现一个很类似的,但是环境不一样
原文链接https://stackoverflow.com/questions/10717798/cmake-error-the-following-variables-are-used-in-this-project-but-they-are-set
参考上文发现大概意思就是 log-lib 找不到了,但是"native-lib"又用到它了
上面说下载安装就好了,可是人家的库是三方库,这个log-lib是自带的啊,我上哪下载,又一万个草泥马奔腾而过!!!

又经过一系列探索发现了这个文件CMakeLists.txt

 

find_library( # Sets the name of the path variable.
              log-lib
              # Specifies the name of the NDK library that
              # you want CMake to locate.
              log )

target_link_libraries( # Specifies the target library.
                       native-lib
                       # Links the target library to the log library
                       # included in the NDK.
                       ${log-lib} )
						)

将含有log-lib的代码注释掉就好了,哪位大神有更好的办法,请不吝赐教!

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值