I am trying to generate the protocol buffer's source files using the Android.bp. All the proto files are located in the folder "proto" and some of the proto files import others. I wrote the Android.bp file in the parent folder and running "mm" gives the following error:
'out/soong/.intermediates/vendor/vendor_name/system/vendor_prj_name/
vendor_proto_gen/android_arm64_armv8-a_vendor_static/gen/proto/proto/app.pb.h', needed by 'out/target/product/prj/obj/STATIC_LIBRARIES/
vendor_proto_gen_intermediates/export_includes', missing and no known rule to make it
I am calling the library in Android.mk file and tried shared/static library combinations but the error still persists. How should the error be addressed?
The Android.bp file is as follows:
cc_library {
name: "vendor_proto_gen",
vendor: true,
host_supported: true,
proto: {
export_proto_headers: true,
type: "full",
canonical_path_from_root: false,
include_dirs: [
"proto",
],
},
shared_libs: [
"libprotobuf-cpp-full",
],
export_include_dirs: ["proto"],
srcs: [
"proto/**/*.proto",
],
}