You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Duplicate package-info.class in a2a-java-sdk-common and -spec breaks Android builds #978
On Android, depending on the A2A Java client fails AGP's checkDuplicateClasses because a2a-java-sdk-common and a2a-java-sdk-spec both ship a byte-identical org/a2aproject/sdk/util/package-info.class.
How to reproduce
A minimal Android project (verified with Android Gradle Plugin 9.2.1, Gradle 9.6.1): settings.gradle.kts
The build fails with the duplicate class shown below. (checkDuplicateClasses is a standard AGP task that also runs during any normal build, e.g. :app:assembleDebug.) Reproduced on both 1.0.0.Final and 1.1.0.Final.
Cause org.a2aproject.sdk.util is a split package — real classes live in both modules (common: Assert, HttpHeaderUtils, NotNull; spec: Utils, ErrorDetail, PageToken) — and each ships its own package-info.java (@NullMarked), so both jars contain a duplicate package-info.class. It's unavoidable for consumers: spec depends on common, and the client/http-client/transports all depend on spec, so both jars are always on the Android classpath.
Expected
An Android app should be able to depend on the A2A Java client without a duplicate-class build failure.
Relevant log output
> Task :app:checkDebugDuplicateClasses FAILED
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class org.a2aproject.sdk.util.package-info found in modules a2a-java-sdk-common-1.0.0.Final.jar -> a2a-java-sdk-common-1.0.0.Final (org.a2aproject.sdk:a2a-java-sdk-common:1.0.0.Final) and a2a-java-sdk-spec-1.0.0.Final.jar -> a2a-java-sdk-spec-1.0.0.Final (org.a2aproject.sdk:a2a-java-sdk-spec:1.0.0.Final)
Activity
kabir commentedon Jul 21, 2026
Hi @kvmilos - I'm looking at this now
refactor: resolve all split packages across Maven modules
refactor!: resolve all split packages across Maven modules (a2aprojec…