Currently, I'm working on google cloud (google pub/sub). I've used java client. But I cannot import JsonFormat class from package com.google.protobuf.util. I'm using intelliJ idea, I have tried invalidate cache and restart the idea. What am I missing?
build.gradle
// google cloud
implementation platform('com.google.cloud:libraries-bom:22.0.0')
implementation 'com.google.cloud:google-cloud-pubsub'
In latest versions of google cloud bom the package com.google.cloud.protobuf:protobuf-util is used with runtime scope, so it's not available during compilation. Not sure why they changed it... Adding manually the dependency with compile scope (maven) or implementation (gradle) should help.
Source: https://mvnrepository.com/artifact/com.google.cloud/google-cloud-pubsub/1.114.7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With