Trần Kim Dự
Trần Kim Dự

Reputation: 6102

GRPC for android: Import different protoc file

I'm using GRPC framework for my project. For example here is my sample directory structure for storing protoc file:

main
  proto
    model
      user.proto
    include
      base.proto

I want to include base.proto into user.proto but I don't know how. I have tried some way to include that such as:

import "include/base.proto"
import "../include/base.proto".

But it doesn't work. I always receive error like:

import "include/base.proto" was not found or had errors.

Please help me figure out this problem.

Upvotes: 0

Views: 301

Answers (1)

Eric Anderson
Eric Anderson

Reputation: 26414

The correct way should be:

import "include/base.proto";

gRPC uses that type of path in multiple tests.

Upvotes: 1

Related Questions