Skip to content
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

In Android, Conflict between protobuf-java and protobuf-javalite. #370

Open
seankim1311 opened this issue Aug 22, 2022 · 4 comments
Open

Comments

@seankim1311
Copy link

Hi, when I add a dependency to build.gradle on Android, the following error appears:

Duplicate class com.google.protobuf.Writer found in modules jetified-protobuf-java-3.17.3 (com.google.protobuf:protobuf-java:3.17.3) and jetified-protobuf-javalite-3.11.4 (com.google.protobuf:protobuf-javalite:3.11.4)
Duplicate class com.google.protobuf.Writer$FieldOrder found in modules jetified-protobuf-java-3.17.3 (com.google.protobuf:protobuf-java:3.17.3) and jetified-protobuf-javalite-3.11.4 (com.google.protobuf:protobuf-javalite:3.11.4)

This seems like a problem with Protobuf, but can I get another version or special detour to avoid this problem in boofcv?

@lessthanoptimal
Copy link
Owner

lessthanoptimal commented Aug 30, 2022

Will adding an exclusion help resolve this conflict? Here's an example from a build.gradle with Groovy DSL

configurations {
    all*.exclude group: "xmlpull", module: "xmlpull"
    all*.exclude group: "org.apache.commons", module: "commons-compress"
    all*.exclude group: "com.thoughtworks.xstream", module: "commons-compress"
}

@SherMish
Copy link

SherMish commented Nov 8, 2022

Will adding an exclusion help resolve this conflict? Here's an example from a build.gradle with Groovy DSL

configurations {
    all*.exclude group: "xmlpull", module: "xmlpull"
    all*.exclude group: "org.apache.commons", module: "commons-compress"
    all*.exclude group: "com.thoughtworks.xstream", module: "commons-compress"
}

I'm having the same issue. Adding the inclusion lines doesn't seem to help.
@seankim1311 Did you solve the problem?

@zvibazak
Copy link

zvibazak commented Nov 8, 2022

@lessthanoptimal we also have this issue.
We can't integrate Firebase and BOOFCV in the same project.

@lessthanoptimal
Copy link
Owner

lessthanoptimal commented Nov 8, 2022

@zvibazak and @seankim1311 can someone share a simple project that I can replicate the issue with? I think @SherMish has a work around, but worried it might be hiding an issue where conflicting jars are included at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants