android proto-lite无法正确构建.proto吗?

时间:2019-07-02 04:54:00

标签: java android gradle protocol-buffers proto

我在我的项目中使用grato java和proto lite使用protobufs,但是在解析下面的proto时遇到问题 https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto

它的构建没有错误,但是我无法导入生成的原型

我收到import lnrpc.Rpc的未找到错误

奇怪的是,如果我注释掉某些行,在其下面显示正确生成的并且可以导入,这是protolite的问题吗?

message MultiChanBackup {
    /**
    Is the set of all channels that are included in this multi-channel backup.
    */
    //repeated ChannelPoint chan_points = 1 [ json_name = "chan_points" ];

    /**
    A single encrypted blob containing all the static channel backups of the
    channel listed above. This can be stored as a single file or blob, and
    safely be replaced with any prior/future versions.
    */
    //bytes multi_chan_backup = 2 [ json_name = "multi_chan_backup" ];
}

message ChanBackupExportRequest {}
message ChanBackupSnapshot  {
    /**
    The set of new channels that have been added since the last channel backup
    snapshot was requested.
    */
    ChannelBackups single_chan_backups = 1 [ json_name = "single_chan_backups" ];

    /**
    A multi-channel backup that covers all open channels currently known to
    lnd.
    */
    //MultiChanBackup multi_chan_backup = 2 [ json_name = "multi_chan_backup" ];
}

message ChannelBackups {
    /**
    A set of single-chan static channel backups.
    */
    //repeated ChannelBackup chan_backups = 1 [ json_name = "chan_backups" ];
}

这是示例项目 https://github.com/mandelmonkey/protoTest

0 个答案:

没有答案