Skip to content

[Bug] MissingMethodException: AccessibilityNodeInfoCompat.set_Checked with AndroidX.Core 1.17.0 #22999

Closed

Description

@RaFaGG

Current behavior

On Android, when the UnoSKCanvasView receives an accessibility focus change, a MissingMethodException is thrown:

System.MissingMethodException: Method not found: void AndroidX.Core.View.Accessibility.AccessibilityNodeInfoCompat.set_Checked(bool)

   at void UnoSKCanvasView.OnFocusChanged(bool gainFocus, FocusSearchDirection direction, Rect previouslyFocusedRect)
   at void ExploreByTouchHelper.OnFocusChanged(bool, int, Rect)
   at void ExploreByTouchHelper.n_OnPopulateNodeForVirtualView_ILandroidx_core_view_accessibility_AccessibilityNodeInfoCompat_(IntPtr, IntPtr, int, IntPtr)

The error is caught and logged (non-crashing), but accessibility for toggle/check state is broken.

Expected behavior

No exception. The accessibility node should correctly report checked state.

How to reproduce

  1. Use Uno Platform with SkiaRenderer on Android
  2. Have a dependency that pulls in Xamarin.AndroidX.Core >= 1.17.0 (e.g., Sentry >= 6.2.0 with Sentry.Bindings.Android for net10.0-android36.0)
  3. Navigate to any page and trigger accessibility focus on the canvas view

Root cause

In UnoExploreByTouchHelper.cs line ~211, the code uses:

node.Checked = peer is IToggleProvider toggleProvider && toggleProvider.ToggleState == On;

Xamarin.AndroidX.Core 1.17.0 renamed the Checked property to IsChecked on AccessibilityNodeInfoCompat, so set_Checked(bool) no longer exists at runtime.

Suggested fix

Replace node.Checked with node.IsChecked in UnoExploreByTouchHelper.cs.

Environment

  • Uno.Sdk: 6.5.31 (also affects 6.6.0-dev.180, file unchanged since July 2025)
  • .NET: 10.0
  • Target: net10.0-android36.0
  • Xamarin.AndroidX.Core: 1.17.0 (pulled by Sentry.Bindings.Android 6.3.0)
  • Device: Samsung SM-S947B, Android 16 (API 36)
  • Affected users: 9 (18 occurrences in Sentry)

Activity

  1. JeremyBP commented on Apr 21, 2026

    @JeremyBP

    Same here and Google keep rejecting aab while publishing because of ANR and crashes due to this exception !

    The root cause is not a rename but a binary breaking change in AndroidX Core.

    In Xamarin.AndroidX.Core ≥ 1.17 binding package, some methods changed their return type from boolean to int, following java changes. However, Uno.UI.Runtime.Skia.Android currently depends (via Xamarin.AndroidX.AppCompat) on Core 1.16.x.

    This creates a runtime signature mismatch:

    • Uno is compiled against boolean
    • runtime may provide int
      → leading to MissingMethodException

    Possible approaches

    1. Upgrade AndroidX dependencies in Uno Directory.Build.targets (preferred clean fix)

      • Move to AppCompat ≥ 1.7.1.2 (instead of current 1.7.0.7)
      • Update Uno code to use new AndroidX signatures
      • No backward compatibility, but clean and future-proof
    2. Add runtime compatibility layer

      • Handle both signatures dynamically (e.g., reflection)
      • Normalize int → bool
      • Keeps compatibility with both 1.16 and 1.17+
    3. Force dependency alignment (workaround)

      • Pin all AndroidX packages to 1.16.x
      • Avoids the issue but blocks upgrades

    This cannot be solved reliably with compile-time changes only, as the issue is ABI-level, not just API-level.

  2. linked a pull request that will close this issueAndroidX compatibility adjustments #23097on Apr 21, 2026
  3. pgonzalezmorelli commented on Apr 22, 2026

    @pgonzalezmorelli

    Hi @MartinZikmund, we're experiencing the same issue on production with our Android app for users with TalkBack enabled. Do you have an estimated delivery time for this fix?

  4. MartinZikmund commented on Apr 22, 2026

    @MartinZikmund
    Member

    Working on it, hope to merge this week

  5. JeremyBP commented on May 4, 2026

    @JeremyBP

    Hope to get that one merged this week, cause I have to say "maybe next week" to my clients each and every week. I know you're doing your best, but just to let you know we're stuck just before the store release with that one.

  6. JeremyBP commented on May 12, 2026

    @JeremyBP

    Hey @MartinZikmund or anyone else at @unodevops, any progress or estimation about this fix ?
    Still postponing play store submission week by week with my clients

  7. 12 remaining items

  8. added a commit that references this issue on May 13, 2026
    e933487
  9. agneszitte commented on May 13, 2026

    @agneszitte
    Member

    AndroidX.Core 1.17 Breaking Change — AccessibilityNodeInfoCompat.setChecked

    The Problem

    AndroidX Core 1.17.0 introduced a binary breaking change to AccessibilityNodeInfoCompat:

    AndroidX.Core ≤ 1.16 AndroidX.Core ≥ 1.17
    Java method setChecked(boolean) setChecked(int) (tristate: 0=false, 1=true, 2=partial)
    JNI signature (Z)V (I)V
    C# binding set_Checked(bool) set_Checked(int)
    isChecked() returns boolean deprecated → getChecked() returns int

    This is an ABI-level break, not just an API rename. Code compiled against one version throws MissingMethodException / NoSuchMethodError at runtime when the other version is loaded.

    Impact on Uno Platform

    • Issue: unoplatform/uno#22999
    • Affected code: UnoExploreByTouchHelper.OnPopulateNodeForVirtualView sets node.Checked = bool, which no longer exists when AndroidX.Core 1.17+ is on the runtime classpath
    • Symptoms: MissingMethodException on Android when accessibility focus is triggered (TalkBack). Non-crashing but breaks accessibility for toggles/checkboxes. Google Play rejections reported (ANR/crash telemetry).
    • Trigger: Any transitive dependency pulling Xamarin.AndroidX.Core ≥ 1.17.0 (e.g., Sentry.Bindings.Android ≥ 6.2.0)
    • Affected versions: Uno 6.5.x, 6.6.x-dev, 6.7.x-dev (code unchanged since July 2025)
    • Community impact: Multiple users are impacted, including some blocked on Play Store submissions and others with apps already affected in production.

    Two Fix Approaches

    1. Full AndroidX bump — PR #23097 (merged → then reverted (with #23265) / superseded)

    • Bumps Xamarin.AndroidX.AppCompat 1.7.0.7 → 1.7.1.3 plus cascading bumps (Activity, Lifecycle, LiveData, Play Core)
    • Raises SupportedOSPlatformVersion from API 21 → 23 (drops Android 5.0–5.1 devices)
    • Changes node.Checked to use the new int-based API with tristate support
    • Problem: Cascading dependency changes broke Microsoft.Maui.Controls 10.0.60's transitively-pinned .Ktx packages (NU1605/NU1608) and required matching bumps in uno.templates

    2. JNI bridge — PR #23262 (preferred interim fix)

    • New AccessibilityNodeInfoCompatJni helper probes both setChecked(I)V and setChecked(Z)V via JNI at first use, dispatches to whichever the loaded binding exposes
    • Zero dependency changes, no minSdk change, no AndroidX cascade
    • AOT/trim safe (no reflection)
    • Compatible with MAUI embedding scenarios
    • Trade-off: no tristate/partial checked support (matches pre-fix behavior)

    Why JNI is the Right Interim Path At The Moment

    Concern Full bump (#23097) JNI probe (#23262)
    Dependency cascade 12 files, AppCompat + Activity + Lifecycle + Play Core bumps None
    minSdk impact 21 → 23 (drops API 21–22) No change
    MAUI embedding Breaks Maui.Controls pinned .Ktx packages Compatible
    Tristate support Yes No (same as pre-fix)
    Backport to stable Risky (breaking changes) Normally Safe

    Long-term Plan

    The full AndroidX dependency update (approach 1) is the correct permanent solution long term, normally, but should wait until MAUI updates their own AndroidX dependency pins to avoid version conflicts in MAUI embedding scenarios. The JNI bridge should unblock users now without ecosystem side effects.

  10. agneszitte commented on May 14, 2026

    @agneszitte
    Member

    Hi @RaFaGG, @JeremyBP, @pgonzalezmorelli More adjustments are currently being validated/tested on our side with #23262. We will keep you up to date as soon as we have a new version available with the proper fixes.

    @RaFaGG, @JeremyBP, @pgonzalezmorelli

    As a follow-up, a new Uno.Sdk version 6.7.0-dev.48 is now available with the adjustments from #23262.

    When you have a chance, could you please test this version and confirm whether it resolves the issue you were facing?

    We know this is blocking Store submissions and impacting production solutions for some of you, so your feedback would be very helpful to confirm the fix quickly and help us decide whether to backport these changes to a stable Uno.Sdk version as soon as possible.

    Thank you in advance for your feedback and for helping us validate this.

  11. pgonzalezmorelli commented on May 15, 2026

    @pgonzalezmorelli

    Hi @agneszitte!

    I did it a try and it's working for my specific issue. We're using 6.5.x and didn't do a full regression so I can't know if it brings any other potential problem elsewhere but our scenario is covered

  12. JeremyBP commented on May 18, 2026

    @JeremyBP

    Hi @agneszitte,

    I can confirm that the fix seems to work as I can't find the missing exception anymore on Sentry.

  13. MartinZikmund commented on May 18, 2026

    @MartinZikmund
    Member

    Glad to hear! Thank you for reporting this issue and sorry for the delays!

  14. JeremyBP commented on May 18, 2026

    @JeremyBP

    You're wellcome.
    Just let me know when it's available from a stable version, preferably backported. You know I still can't submit an app to store with such a 6.7.0-dev.48 version :)

  15. agneszitte commented on May 18, 2026

    @agneszitte
    Member

    Thank you so much @pgonzalezmorelli and @JeremyBP for the feedback, it is appreciated!

    We will follow up with a new Uno.Sdk 6.5 stable version that includes the fixes as soon as possible to help unblock anyone impacted, and we will let you know once it is available.

  16. added a commit that references this issue on May 18, 2026
    8153174
  17. agneszitte commented on May 19, 2026

    @agneszitte
    Member

    We will follow up with a new Uno.Sdk 6.5 stable version that includes the fixes as soon as possible to help unblock anyone impacted, and we will let you know once it is available.

    @JeremyBP, @pgonzalezmorelli, @RaFaGG
    As an update, the fix has now been backported, and a new Uno.Sdk 6.5.36 stable version is available with the fix.

  18. JeremyBP commented on May 26, 2026

    @JeremyBP

    My customer's app is finaly live on Play Store thanks to this fix. 🚀
    It was a quite stressed waiting, as it's a tennis field booking app in France, which must be live before Roland Garros kicking off. 🎾
    Right on time ! 🕐
    Thank you guys 👍

  19. agneszitte commented on May 27, 2026

    @agneszitte
    Member

    @JeremyBP, that’s awesome news, thank you for confirming! 🚀

    Really happy to hear the fix landed in time and that your customer’s app is now live on the Play Store before Roland-Garros.
    Congrats on the release! 🎾

    If the app is publicly available, you’re comfortable sharing it more broadly, and it could be useful to the broader community during Roland-Garros, don't hesitate to post it on socials. If mentioning Uno Platform is okay on your side as well, tag us, we’d be happy to help give it some visibility 😉 (X, Discord, Bluesky, LinkedIn, YouTube)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions