构建Android ROM时出现以下错误,要么是AOSP / CyanogenMod

In file included from hardware/ril-caf/libril/RilSapSocket.cpp:21:0:
hardware/ril-caf/libril/RilSapSocket.h:22:55: fatal error: hardware/ril/librilutils/proto/sap-api.pb.h: No such file or directory
 #include <hardware/ril/librilutils/proto/sap-api.pb.h>
                                                       ^
compilation terminated.


当我查看github.com/CyanogenMod和github.com/Android中的路径时,我找不到sap-api.pb.h
可能是什么问题,我该如何解决?

最佳答案

我收到了相同的错误消息,并尝试使用find命令查找生成的文件:

$ find . -name "sap-api.pb.h"
./out/target/product/bacon/gen/STATIC_LIBRARIES/librilutils_static_intermediates/proto/hardware/ril-caf/librilutils/proto/sap-api.pb.h
./out/target/product/bacon/gen/SHARED_LIBRARIES/librilutils_intermediates/proto/hardware/ril-caf/librilutils/proto/sap-api.pb.h


然后我注意到#include路径与真实路径有些不同,我打开了错误.h文件,并将这两个文件中的hardware/ril/...更改为hardware/ril-caf/...


hardware/ril-caf/libril/rilSocketQueue.h
hardware/ril-caf/libril/RilSapSocket.h


然后,构建通过。

希望能有所帮助。

10-06 05:04