问题
Android 7.1 在framework/base/core目录下添加文件java和aidl文件后,编译时需要先make update-api去更新current.txt文件,然后才能完整编译android。
Android 12发现已经不一样了,不需要make update-api,但是编译的时候会报如下错误:
Error: out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/aligned/framework-minus-apex.jar contains class file com.xx.sss.IBinderPool, whose package name "com.xx.sss" is empty or not in the allow list build/soong/scripts/check_boot_jars/package_allowed_list.txt of packages allowed on the bootclasspath.
解决方法:
在package_allowed_list.txt中把新添加的包名加上即可,如下图红框所示,其中\是转义字符