Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Instrumentation Test compile failed by protobuf classes duplication

Open
#1,793 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java
Domain
mobile, testing-qa

Research direction

No repository files or tests are named. Start by reproducing the instrumentation build with androidx.test.espresso:espresso-contrib:3.5.1 and inspect the dependency graph for protobuf-javalite-3.22.2 and protobuf-lite-3.0.1; done means the instrumentation test compiles without duplicate protobuf classes.

Written by the indexing model from the issue text.

Description

Description
  • I'm using protobuf/gRPC on my android app and I tried to use androidx espresso, but build was failed.
  • Since Protobuf 3.8.0, it introduced new javalite runtime (com.google.protobuf:protobuf-javalite), but espresso still uses too old javalite runtime(com.google.protobuf:protobuf-lite)
Steps to Reproduce
  • N/A
Expected Results
  • Compile unittest without error
Actual Results
  • Gradle shows following error message.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.AbstractMessageLite$Builder found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.AbstractParser found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.AbstractProtobufList found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.BooleanArrayList found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteBufferWriter found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteOutput found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$1 found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$ArraysByteArrayCopier found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$BoundedByteString found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$ByteArrayCopier found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$ByteIterator found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$CodedBuilder found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$LeafByteString found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$LiteralByteString found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$Output found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$SystemByteArrayCopier found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.CodedInputStream found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.CodedOutputStream found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.CodedOutputStream$1 found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javalite:3.22.2) and protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.CodedOutputStream$AbstractBufferedEncoder found in modules protobuf-javalite-3.22.2 (com.google.protobuf:protobuf-javal…
AndroidX Test and Android OS Versions
  • androidx.test.espresso:espresso-contrib:3.5.1
  • OS : Any
Link to a public git repo demonstrating the problem:
  • N/A
Dominant language
Java
Stars
1.2k
Forks
342
Avg merge
1d 14h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from android/android-test

All issues in android/android-test

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.