I am facing the below error while building my app:
Cause: protoc: stdout: . stderr: google/protobuf/descriptor.proto: File not found.
google/api/annotations.proto:20:1: Import "google/protobuf/descriptor.proto" was not found or had errors.
google/api/annotations.proto:26:8: "google.protobuf.MethodOptions" is not defined.
google/api/annotations.proto:19:1: warning: Import google/api/http.proto but not used.
Can you please point me to the solution to this as I am unable to find any.
Gradle dependencies : App - level gradle :
protobuf { protoc { artifact = 'com.google.protobuf:protoc:3.8.0' } generateProtoTasks { all().each { task -> task.builtins { java { option "lite" } } } } } implementation "io.grpc:grpc-okhttp:1.31.1 implementation "io.grpc:grpc-stub:1.31.1" implementation 'javax.annotation:javax.annotation-api:1.2' implementation 'com.google.protobuf:protobuf-javalite:3.12.0'Project - level gradle:
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.13'protobuf-javalite does not support descriptors; it does not have generated code for them nor the .proto. See protocolbuffers/protobuf#7331
Can you please tell me how to fix this ? Since I cannot use protobuf java and javalite which I was using earlier, but after updating all my firebase libraries I have to use only javalite.
Pointing me to fix this would really be helpful.
Thanks.
Could you please point me to the protobuf release zip ?
I added the descriptor.proto file in my project.
Got the following error:
Cause: protoc: stdout: . stderr: google/logging/v2/logging.proto:23:1: warning: Import google/rpc/status.proto but not used.
google/logging/v2/logging_config.proto:21:1: warning: Import google/protobuf/timestamp.proto but not used.
google/protobuf/duration.proto: File not found.
google/rpc/error_details.proto:19:1: Import "google/protobuf/duration.proto" was not found or had errors.
google/rpc/error_details.proto:41:3: "google.protobuf.Duration" is not defined.
So I added the duration.proto in my project and got the following error:
Type com.google.protobuf.Duration is defined multiple times: /home/lenovo/.gradle/caches/transforms-2/files-2.1/fab9806a52977a742b01bb17fa23656f/jetified-protobuf-javalite-3.12.0.jar:com/google/protobuf/Duration.class, /home/lenovo/AndroidStudioProjects/NikiLite/app/build/intermediates/javac/debug/classes/com/google/protobuf/Duration.class