Generate protocol buffer files using Android.bp

Skip to first unread message

Chetean B

Jul 6, 2022, 2:02:24 PMJul 6
to Android Building
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 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: [
    shared_libs: [
    export_include_dirs: ["proto"],
    srcs: [

Thank you
Reply all
Reply to author
0 new messages