Protobuf-java and Protobuf-javalite

1,062 views
Skip to first unread message

Matthew Perkins

unread,
Jun 22, 2021, 5:53:34 PM6/22/21
to Protocol Buffers
Hi guys,

We have an android app that we're attempting to use Firebase in, but a dependency we use is using protobuf-java causing conflicts with Firebase and it's inclusion of protobuf-javalite.

We've found some suggestions but nothing really consistent.

We can get the application to build and run using this block in the android block of the apps build.gradle file:

configurations {
     implementation.exclude module:'proto-google-common-protos'
     implementation.exclude module:'protolite-well-known-types'
     implementation.exclude module:'protobuf-lite'
     implementation.exclude module:'protobuf-javalite'
}


Is there a better way (short of eliminating the dependency that uses protobuf-java) to ensure compatibility?

Any suggestions would be greatly appreciated.

Thanks!

Derek Perez

unread,
Jun 22, 2021, 6:12:02 PM6/22/21
to Matthew Perkins, Protocol Buffers
Can you tell what version of protobuf firebase is pulling in? I wonder if we can get one or the other updated?

--
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 protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/d7932836-f94d-4d16-8700-f4db56046572n%40googlegroups.com.

Matthew Perkins

unread,
Jun 22, 2021, 6:15:44 PM6/22/21
to Protocol Buffers
Firebase is using: protobuf-javalite:3.14.0

Matthew Perkins

unread,
Jun 22, 2021, 6:21:45 PM6/22/21
to Protocol Buffers
Attached is the build error I'm encountering
protobuf_issues.rtf

Derek Perez

unread,
Jun 22, 2021, 6:27:18 PM6/22/21
to Matthew Perkins, Protocol Buffers
Have you tried reaching out to firebase to see if they can release a version w/ updated deps? They are pretty far behind.

Matthew Perkins

unread,
Jun 22, 2021, 6:29:30 PM6/22/21
to Protocol Buffers
I did.  But it's not a version number issue, its a lite vs full issue.

Derek Perez

unread,
Jun 22, 2021, 6:33:10 PM6/22/21
to Matthew Perkins, Protocol Buffers
Ah right, I see.

OK, yeah your best option is to get the other dependency to move to lite or drop it. If this is a mobile project you'll definitely wanna stay with lite for performance reasons.

Matthew Perkins

unread,
Jun 22, 2021, 6:35:35 PM6/22/21
to Protocol Buffers
Makes sense.  Thanks for the assistance.
Reply all
Reply to author
Forward
0 new messages