-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protobuf-java
and protobuf-javalite
conflict
#8104
Comments
@danwaters-stripe , any luck to resolve this issue? |
Sorry for late response,
Currently we do not make Now you might ask yourself, OK, but what if I do end up doing that (or a transitive dependency does)? Well, if you're using Gradle, we recommend an approach like this: https://docs.gradle.org/current/userguide/dependency_downgrade_and_exclude.html#sec:excluding-transitive-deps Telling the system to exclude As a good rule of thumb, if you're publishing an Android-targeted library, its recommended you depend on |
hoo found it |
What version of protobuf and what language are you using?
Version: v3.11.4
Language: Java
What operating system (Linux, Windows, ...) and version?
Mac OS 10.15.7
What did you do?
Including both
protobuf-java
andprotobuf-javalite
causes duplicate class errors on build. The simplest reproduction is to just include both as dependencies:This will generate these errors on build:
Even more concerning to me is that you get the same errors even when you just include dependencies on libraries that use these two different libraries. Like firebase:
Since we publish a library that has a dependency on
protobuf-java
, this means that our library will always conflict with any library that usesprotobuf-javalite
.The text was updated successfully, but these errors were encountered: