I think you're right that this is likely a problem with guava. Can you try
posting a bug in their repo?
On Thursday, June 15, 2023 at 6:55:37 PM UTC-7 Kevin Jimenez wrote:
> I am trying to install grpc for Android with access to Timestamp. The
> generated code generates ok but the project throws this error. I did some
> research and it looks like it has to do with guava. Attached is my app
> build.grade:
>
> *Error*
>
> > Task :app:compileDevDebugJavaWithJavac
> error: cannot access CheckReturnValue
> class file for javax.annotation.CheckReturnValue not found
> cannot access CheckReturnValue
>
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> 1 error
>
> Build Gradle Snippet
> ``
>
> // You need to build grpc-java to obtain these libraries below.
> implementation 'io.grpc:grpc-okhttp:1.55.1' // CURRENT_GRPC_VERSION
> implementation 'io.grpc:grpc-protobuf-lite:1.55.1' //
> CURRENT_GRPC_VERSION
> implementation 'io.grpc:grpc-stub:1.55.1' // CURRENT_GRPC_VERSION
> implementation 'org.apache.tomcat:annotations-api:6.0.53'
> implementation 'com.google.protobuf:protobuf-javalite:3.23.2'
> implementation("com.google.protobuf:protobuf-java:3.23.0") {
> exclude(group: 'com.google.guava', module: 'guava')
> exclude(group: 'org.checkerframework', module:
> 'checker-compat-qual')
> exclude(group: 'javax.annotation', module: 'jsr250-api')
> exclude(group: 'io.opencensus', module: 'opencensus-api')
> exclude(group: 'com.google.errorprone', module:
> 'error_prone_annotations')
> exclude(group: 'com.google.protobuf', module: 'protobuf-javalite')
> exclude(group: 'io.grpc', module: 'grpc-context')
> }
> // implementation 'com.google.errorprone:error_prone_annotations:2.18.0'
> // implementation("com.google.guava:guava:32.0.1-android")
> //protobuf 'com.google.protobuf:protobuf-java:3.23.0'
> }
>
> protobuf {
> protoc { artifact = 'com.google.protobuf:protoc:3.23.2' }
> plugins {
> grpc {
> artifact = 'io.grpc:protoc-gen-grpc-java:1.55.1' //
> CURRENT_GRPC_VERSION
> }
> }
> generateProtoTasks {
> all().each { task ->
> task.builtins {
> java { option 'lite' }
> }
> task.plugins {
> grpc { // Options added to --grpc_out
> option 'lite'
> }
> }
> }
> }
> }
> ```
>
> Thanks in advance! Lmk if you want any more info
>
>
--
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/d102f575-ee36-4c5d-aa7f-d1c88525aa5en%40googlegroups.com.