Home > Blockchain >  Error in Pub/Sub while configuring gradle file
Error in Pub/Sub while configuring gradle file

Time:10-16

I'm Implementing GCP pubsub using this documentation and getting error:

No method 'of' in Topicname class

gradle file I'm using:

implementation platform('com.google.cloud:libraries-bom:20.8.0')
compile 'com.google.cloud:google-cloud-pubsub:1.113.5'

Any ideas as to why this issue is happening?

CodePudding user response:

We get this kind of errors due to issue in dependencies specified during the setup.

I Followed this documentation with the below build.gradle file:

Dependencies{
implementation platform('com.google.cloud:libraries-bom:20.8.0')
compile 'com.google.cloud:google-cloud-pubsub'
}

And it is working as expected.

  • Related