CallStack Android Native system/core/include/android/log.h:120:20: error: ‘__format__‘ attribute arg

Android Native 代码加入CallStack 时,编译报错

In file included from system/core/include/utils/CallStack.h:20:
system/core/include/android/log.h:120:20: error: '__format__' attribute argument not supported: LogOutput [-Werror,-Wignored-attributes]
    __attribute__((__format__(printf, 3, 4)))
                   ^
system/core/include/android/log.h:138:20: error: '__format__' attribute argument not supported: LogOutput [-Werror,-Wignored-attributes]
    __attribute__((__format__(printf, 3, 0)))
                   ^
system/core/include/android/log.h:169:20: error: '__format__' attribute argument not supported: LogOutput [-Werror,-Wignored-attributes]
    __attribute__((__format__(printf, 3, 4)))
                   ^
system/core/include/android/log.h:200:20: error: '__format__' attribute argument not supported: LogOutput [-Werror,-Wignored-attributes]
    __attribute__((__format__(printf, 4, 5)))
                   ^
In file included from vendor/nxp/fsl_imx_omx/OpenMAXIL/src/component/v4l2_common/V4l2Object.cpp:12:
In file included from system/core/include/utils/CallStack.h:22:
system/core/include/utils/String8.h:65:77: error: 'format' attribute argument not supported: LogOutput [-Werror,-Wignored-attributes]
    static String8              format(const char* fmt, ...) __attribute__((format (printf, 1, 2)));
                                                                            ^
system/core/include/utils/String8.h:95:36: error: 'format' attribute argument not supported: LogOutput [-Werror,-Wignored-attributes]
                    __attribute__((format (printf, 2, 3)));
                                   ^
In file included from vendor/nxp/fsl_imx_omx/OpenMAXIL/src/component/v4l2_common/V4l2Object.cpp:12:
In file included from system/core/include/utils/CallStack.h:23:
In file included from system/core/include/utils/Vector.h:23:
In file included from system/core/include/log/log.h:31:
system/core/include/log/log_id.h:52:20: error: '__format__' attribute argument not supported: LogOutput [-Werror,-Wignored-attributes]
    __attribute__((__format__(printf, 4, 5)))

将#include <utils/CallStack.h>放到cpp文件最上方,问题消息

对于问题"AttributeError: module 'tensorflow.compat.v1' has no attribute 'contrib'",可以尝试以下解决方法: 1. 首先确认你正在使用的是兼容TensorFlow 1.x版本的代码,因为在TensorFlow 2.x版本中,"contrib"模块已经被移除了。如果你正在使用TensorFlow 2.x,那么应该查找替代的方式来实现你的目标。 2. 如果你确实在使用TensorFlow 1.x版本,那么你可以尝试更新TensorFlow版本,以确保你使用的是最新的稳定版本。你可以使用以下命令在终端中更新TensorFlow: ``` pip install --upgrade tensorflow ``` 3. 如果更新TensorFlow后仍然出现相同的错误,那么可能是因为你的代码中使用了已被弃用的特性或函数。你可以查看TensorFlow官方文档或迁移指南,以了解替代的方法。 对于问题"AttributeError: module 'matplotlib.cbook' has no attribute '_Stack'",可以尝试以下解决方法: 1. 首先,确认你已经正确安装了matplotlib库。你可以使用以下命令在终端中安装最新版本的matplotlib: ``` pip install --upgrade matplotlib ``` 2. 如果你已经安装了最新版本的matplotlib,那么可能是因为你的代码中存在命名冲突或循环导入的问题。你可以尝试重命名你的文件,以避免与matplotlib模块的命名冲突。 3. 另外,你还可以尝试清除缓存并重新导入模块。你可以在终端中执行以下命令清除缓存: ``` python -c "import matplotlib; matplotlib._rebuild()" ``` 4. 如果上述方法仍然无效,那么可能是因为你的matplotlib库存在一些问题。你可以考虑卸载并重新安装matplotlib。执行以下命令卸载matplotlib: ``` pip uninstall matplotlib ``` 然后重新安装matplotlib: ``` pip install matplotlib ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值