protobuf doesn't see .proto files in gradle project

429 Views Asked by At

Protobuf plugin for gradle:

id 'com.google.protobuf' version '0.8.13'

Here is dependencies from build.gradle

implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
implementation "com.google.protobuf:protobuf-java:${protobufVersion}"
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"

I'm trying to start a test in a project. But I get the following error:

Could not make proto path relative: D:\Users\�������������\IdeaProjects\service-tester\src\main\proto\messaging_core\message\message.proto: No such file or directory

while message.proto file is present in the project

enter image description here

What I need to make protobuf start to see .proto files ?

1

There are 1 best solutions below

0
On

Do you have "protobuf" section in project gradle file? Please take a look at following official example: https://github.com/grpc/grpc-java/blob/v1.46.x/examples/android/helloworld/app/build.gradle