错误:error: static_assert failed due to requirement 'internal::allowedManualInterface("android.test.Icallback")' "b/64223827: Manually written binder interfaces are considered error prone and frequently have bugs. The preferred way to add interfaces is to define an .aidl file to auto-generate the interface. If an interface must be manually written, add its name to the whitelist."
        IMPLEMENT_META_INTERFACE(callback, "android.test.Icallback");

我在开发android系统私有服务 版本28之前都是使用Andorid.mk,编译都没大问题
现在Android11后,变成Andorid.bp,编译规则特别严格
之前的CS结构,进程间接口都是我自己手写的,最新编译
IMPLEMENT_META_INTERFACE 直接static_assert报错,看提示需要加入一个白名单;

#define IMPLEMENT_META_INTERFACE(INTERFACE, NAME)                       \
    static_assert(internal::allowedManualInterface(NAME),               \
                  "b/64223827: Manually written binder interfaces are " \
                  "considered error prone and frequently have bugs. "   \
                  "The preferred way to add interfaces is to define "   \
                  "an .aidl file to auto-generate the interface. If "   \
                  "an interface must be manually written, add its "     \
                  "name to the whitelist.");                            \
    DO_NOT_DIRECTLY_USE_ME_IMPLEMENT_META_INTERFACE(INTERFACE, NAME)    \

1、我最后在IInterface.h中找打白名单,加入我的就行frameworks\native\libs\binder\include\binder\IInterface.h

kManualInterfaces是白名单

2、暂时的粗暴规避
#ifndef DO_NOT_CHECK_MANUAL_BINDER_INTERFACES
#define DO_NOT_CHECK_MANUAL_BINDER_INTERFACES 1
#endif

androd11 编译 Manually written binder interfaces are considered error prone and frequently have bugs.相关推荐

  1. 解决编译apache出现的问题:configure: error: APR not found . Please read the documentation

    本文出自 "____哊.時^随记" 博客,请务必保留此出处http://xtony.blog.51cto.com/3964396/836508 解决了我的问题 解决编译apache ...

  2. 关于 国产麒麟系统编译Qt项目是报错:error: cannot find -lGL 的解决方法

    若该文为原创文章,转载请注明原文出处 本文章博客地址:https://hpzwl.blog.csdn.net/article/details/123784051 红胖子(红模仿)的博文大全:开发技术集 ...

  3. 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope

    解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...

  4. php zip.so 编译出错,php使用ZipArchive提示Fatal error: Class ZipArchive not found in的解决方法...

    本文实例讲述了php使用ZipArchive提示Fatal error: Class ZipArchive not found in的解决方法.分享给大家供大家参考.具体如下: ZipArchive是 ...

  5. Linux解决编译Apache出现的问题:configure: error: APR not found

    问题 #./configure --prefix--检查编辑环境时出现: checking for APR... no configure: error: APR not found . Please ...

  6. Makefile编译忽略warning或者将warning视为error

    在Makefile编译命令后面: 添加 -w(小写) 可以忽略warning: 添加 -Werror 可以将warning当作error,出现warning时停止编译; 添加 -Wall 可以输出所有 ...

  7. c语言中1120是什么错误,C++编译常见问题汇总(二)fatal error LNK1120 错误

    (二).fatal error LNK1120 错误 这是工程的类型选择错误引起的. 如在VC中, 1.本来应该选择"Win32 Console Application",而错误选 ...

  8. Visual studio 之常见编译错误(1):syntax error : missing ';' before identifier 'PVOID64'

    来自博客:http://blog.csdn.net/chenyusiyuan/article/details/4643313的总结: 一般可通过调整 DirectShow/Include 在 Tool ...

  9. IDEA 编译报错Compilation completed with 1 error and 0 warnings

    问题:如图 原因:工程要求的编译器版本'11'和你本地的不一致导致. 问题分析和解决: 第一.检查工程的pom.xml文件中是否定义了要求的java编译版本,如图,如果你本地的编译是8,而文件定义的是 ...

最新文章

  1. 学习在 ArcEngine 中使用 Geoprocessing
  2. 使用SAP WebIDE进行一个典型的bug修复流程
  3. php 数据接口,初识 php 接口
  4. 榆落微时光社区小程序源码V1.0.35
  5. iOS 两种易混淆的存储路径
  6. MATLAB代码实现射线追踪的快速方法
  7. 微信里文件小程序导不出来_懒得打开电脑传文件?这四类小程序把这事解决了-小程序视频怎么发在电脑上...
  8. 类和对象编程(三):构造函数析构函数
  9. c#如何实现叫号操作_C#开发银行叫号系统
  10. 求四边形最大内接矩形,一种不规则多边形的最大内接矩形的快速近似求解方法与流程...
  11. java xml特殊字符_mybatis xml中特殊字符处理及特殊符号
  12. 【金融项目】尚融宝项目(七)
  13. 【转载】树莓派 Raspberry Pi Pico windows7 串口驱动
  14. blowfish java_Java语言实现Blowfish加密算法完整代码分享
  15. 考PMP试题的经验和对策
  16. Frenetic Python实验(一)
  17. C语言入门(四):有关逻辑的运算符和表达式
  18. php 获取目录分隔符,php目录分隔符DIRECTORY_SEPARATOR
  19. 首席新媒体黎想教程:线上活动推广执行手册——第二篇
  20. 公开披露:美国如何联合作战并入侵ISIS网络

热门文章

  1. 谷歌关键词是怎么排名的?google关键词优化
  2. Java爬爬之网页去重和代理ip
  3. WMI Provider Host(wmiprvse.exe)占用CPU高的解决方案
  4. 技术分享|数据分析与可视化
  5. 戴尔 R730 服务器系统安装
  6. mysql bytes sent_MySQL服务器状态变量(mysqld)
  7. 安卓手机软件开发_安卓最牛的下载神器,快收藏起来自己偷偷用
  8. vue和java获取地理位置经纬度
  9. 安卓硬件模拟大师_青春的记忆,记安卓防御软件历史见证者:LBE安全大师
  10. 聚类分析(K-means算法)