Hi, Any update on this please?
We are stuck due to this On Wednesday, 21 October 2020 at 18:03:18 UTC+5:30 Narayan Tendulkar wrote: > Hi, > > Below is a blocker we are facing related to protobuf which are blocked on, > the github thread for the same is as per here. > https://github.com/google/protobuf-gradle-plugin/issues/431 > > 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' > <https://github.com/ejona86> > Collaborator > *ejona86 <https://github.com/ejona86> *commented on Sep 2 > <https://github.com/google/protobuf-gradle-plugin/issues/431#issuecomment-685750337> > > protobuf-javalite does not support descriptors; it does not have generated > code for them nor the .proto. See protocolbuffers/protobuf#7331 > <https://github.com/protocolbuffers/protobuf/issues/7331> > <https://github.com/meghanashastri> > Author > *meghanashastri <https://github.com/meghanashastri> *commented on Sep 3 > <https://github.com/google/protobuf-gradle-plugin/issues/431#issuecomment-686278257> > > 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. > <https://github.com/ejona86> > Collaborator > *ejona86 <https://github.com/ejona86> *commented on Sep 3 > <https://github.com/google/protobuf-gradle-plugin/issues/431#issuecomment-686592584> > > The main workaround I would know is to copy descriptors.proto into your > repo and generate code for it. (There's probably a way with gradle to > download the protobuf release zip and extract just the one file; but that'd > be more plumbing.) > <https://github.com/meghanashastri> > Author > *meghanashastri <https://github.com/meghanashastri> *commented on Sep 14 > <https://github.com/google/protobuf-gradle-plugin/issues/431#issuecomment-691857195> > > Could you please point me to the protobuf release zip ? > <https://github.com/ejona86> > Collaborator > *ejona86 <https://github.com/ejona86> *commented on Sep 14 > <https://github.com/google/protobuf-gradle-plugin/issues/431#issuecomment-692165887> > > There's a couple to choose from: > > https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protobuf-java-3.13.0.zip > https://github.com/protocolbuffers/protobuf/archive/v3.13.0.zip > > https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.13.0/protobuf-java-3.13.0.jar > <https://github.com/meghanashastri> > Author > *meghanashastri <https://github.com/meghanashastri> *commented on Sep 15 > <https://github.com/google/protobuf-gradle-plugin/issues/431#issuecomment-692511486> > > 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 > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/dcd59fb2-3a82-4d85-8a46-b557f650c6c6n%40googlegroups.com.
