Google Play Age Signals – R8 Duplicate Class Errors (androidx.tracing + androidx.savedstate) in Xamarin/Android Binding
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- android, csharp
- Domain
- build-system, mobile-dev
Research direction
Start by inspecting the dependency graph of com.google.android.play:age-signals in Xamarin.Google.Android.Play.Age.Signals 0.0.1-beta02 and reproduce the R8/D8 duplicate classes for androidx.tracing and androidx.savedstate. Done means the binding has consistent AndroidX dependencies or documented R8/D8 linking guidance that allows a successful .NET 9 Android production build.
Written by the indexing model from the issue text.
Description
Description
We are integrating the Google Play Age Signals API (package: com.google.android.play:age-signals) using the official Xamarin binding package ‘Xamarin.Google.Android.Play.Age.Signals (0.0.1-beta02)’.
During R8/D8 compilation, the build fails with duplicate class errors:
Duplicate class: androidx.tracing.TraceKt$traceAsync$1 - tracing-android.aar - tracing-ktx.aar
Duplicate class: androidx.savedstate.ViewKt - savedstate-android.aar - savedstate-ktx.aar
This occurs even when:
Explicitly pinning AndroidX versions
Excluding tracing/savedstate dependencies
Adding ProGuard rules
Using in NuGet
The issue appears to originate from the Age Signals AAR pulling mismatched AndroidX dependencies (ktx + non-ktx) that produce conflicting classes.
We cannot integrate Age Signals into production until this is resolved.
Request:
Please verify the dependency structure for com.google.android.play:age-signals
Update the AAR to depend consistently on either android or ktx variants
Provide guidance for R8/D8 linking with Age Signals
Environment:
.NET 9 Android
R8 8.7.x
Xamarin.AndroidX.* stable versions
Xamarin.Google.Android.Play.Age.Signals 0.0.1-beta02
Thank you.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
10.0.20
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
- Dominant language
- C#
- Stars
- 318
- Forks
- 73
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/android-libraries
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
dotnet/android-libraries#1503 ·
-
dotnet/android-libraries#1470 · 1 reaction · 2 assignees ·
-
dotnet/android-libraries#1467 · 1 reaction · 2 assignees ·
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
dotnet/android-libraries#1456 · 2 comments · 1 reaction ·
-
area-androidx missing-api
Difficulty 4/5 3-5 days Newbie friendliness 52/100
dotnet/android-libraries#1453 ·
All issues in dotnet/android-libraries
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·