【Android编译error】error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
问题1:
external/libweave/src/privet/privet_handler.cc:451:16: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
auto pred = [this](const UpdateRequestParameters& params) {
^
external/libweave/src/privet/privet_handler.cc:465:16: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
auto pred = [this](const UpdateRequestParameters& params) {
^
external/libweave/src/privet/privet_handler.cc:477:16: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
auto pred = [this](const UpdateRequestParameters& params) {
解决办法:
找到对应的git仓下的Android.mk文件,打开删除-Werror即可解决。
代码就是生活的一部分。
坚持每天积累一点,时间久了,你就牛b了!