I’m currently creating an app with Unity, and I found the following errors while creating it.
Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-java-3.22.3 (com.google.protobuf:protobuf-java:3.22.3) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder found in modules jetified-protobuf-java-3.22.3 (com.google.protobuf:protobuf-java:3.22.3) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream found in modules jetified-protobuf-java-3.22.3 (com.google.protobuf:protobuf-java:3.22.3) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.AbstractMessageLite$InternalOneOfEnum found in modules jetified-protobuf-java-3.22.3 (com.google.protobuf:protobuf-java:3.22.3) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
This error says that protobuf-java and protobuf-javalite cannot be used at the same time.
I know this too.
The development carried out up to this point was developed using an API that enables Bluetooth communication with external devices on Android, and normal Bluetooth communication was possible through this function.
After confirming that the connection is working well, I will try to apply firebase. After applying firestore, the above error occurs.
It is possible to press the Play button in Unity, but it is not building.
I need to use both the features of protobuf-java and the features of protobuf-javalite.
1. Is it possible to exclude only one side of the conflicting classes that occur between protobuf-java and protobuf-javalite when building?
2. If that doesn’t work, is there a way to use firestore?
I’ve been thinking about it for a week. please help me
LJH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.