Repository navigation
Description
The Xamarin.AndroidX.Compose.Runtime NuGet currently ships an empty managed facade. Its Transforms/Metadata.xml carries:
<remove-node path="/api/package" />with a comment that Compose is Kotlin-only and "does not make sense for C# until parsing of kotlin and transpiling to c# is ready (if ever)".
That's too pessimistic — for the runtime types specifically, the binding generator does fine on the AAR if you add a small, bounded set of targeted <remove-node> entries. I have a proven-working rebinding of androidx.compose.runtime:runtime-android 1.9.4 in ComposeNet.Bindings.Runtime — it builds, packs, and is consumed end-to-end by a working Compose-from-C# sample app.
Requested change
- Delete
<remove-node path="/api/package" />from the recipe'sTransforms/Metadata.xml. - Port the 14 targeted
<remove-node>entries from the proven-workingTransforms/Metadata.xml. They cover:SnapshotStateList/Map/Set+ their*Ktcompanions (KMPcollection-jvminterface erasure ⇒Size()/Values()/EntrySet()signature mismatch withjava.util.*).MutableSnapshot/Snapshot.getReadObserver(Kotlin typealias(Any) -> Unit).AbstractApplier<T>(abstractIApplier.insertBottomUp/TopDown(int, T)doesn't satisfyIApplier<Object>after erasure).BroadcastFrameClock,PausableMonotonicFrameClock(missingCoroutineContext.Element.keyoverride).MutableIntState/LongState/FloatState/DoubleStateand their non-mutable peers (primitivevalueaccessor hidesMutableState<T>.valuesetter).MonotonicFrameClock.KeyandSnapshotContextElement.Key(nested companionKeyclashes with inheritedCoroutineContext.Element.key).ComposerKt.isAfterFirstChild(two inline-class overloads collapse to identical JVM signatures).
- Add
<AndroidIgnoredJavaDependency Include="androidx.collection:collection-jvm:1.5.0" />to satisfy the dependency verifier (the-androidvariant fromXamarin.AndroidX.Collectionalready satisfies it at runtime). - Regenerate
api/PublicApi*.txt. The reversal from "no public API" to "real bindings" adds many hundreds of public types/members; the existing baselines will fail the API compatibility check until refreshed.
Why now
Google declared Compose-first in May 2026 — android.widget.*, Fragments, RecyclerView, ViewPager are now maintenance mode. .NET for Android needs a story for hosting Compose UI from C#, and the empty-facade policy is the only thing blocking it for the runtime types. See https://github.com/jonathanpeppers/compose-net (notably NOTES.md and README.md) for the broader strategy.
Sequencing
This is the prerequisite for two companion issues (UI/Foundation/Foundation.Layout and Material3) — Runtime ships first because every other Compose recipe references real types from it.
Activity
Ship real bindings for Xamarin.AndroidX.Compose.Runtime (#1415)
Ship real bindings for Xamarin.AndroidX.Compose.Runtime (#1415)
Ship real bindings for Xamarin.AndroidX.Compose.Runtime (#1415)
Fix material3 CS0234 by removing MaterialTheme.getMotionScheme
Add new Compose.Runtime namespaces to published-namespaces.txt
Ship real bindings for Xamarin.AndroidX.Compose.Runtime (dotnet#1418)