dotnet/android-libraries

Bind "androidx.compose.ui"

Take-A-Byte opened this issue · 4 comments

I believe there are already a library for this:
https://www.nuget.org/packages/Xamarin.AndroidX.Compose.UI

Note it only adds the Java library to your application. Compose cannot be used to construct user interfaces from Java, and thus also cannot construct them in C#. We provide this package so that if you have a Kotlin library that depends on it, that library will work, and you can consume user interfaces written in Kotlin.

Ohh! Thanks interesting to know. Thanks. This was helpful 🙇

@jpobst Just a clarifying question. Is this why we get warnings like the following?

The Java type 'androidx.compose.ui.text.TextStyle
' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)

If that's a binding project, most likely. It is looking for a C# binding for that Java type and there isn't one.

It will not be able to bind whatever API is relying on that type.