ICU4C precompiled binaries for Unity Android

21 views
Skip to first unread message

Lucas García Mateu

unread,
Sep 11, 2025, 9:11:42 AMSep 11
to icu-support

Greetings,


For context, I will explain the full extent of our intentions with ICU4C, since there might be a better approach to our objective than the one we are taking.


Context


We use Unity to build digital products for the Middle East. Our UI system of choice is Unity UI, however the TextMeshPro text component doesn’t feature support for RTL languages. That’s why we have built a custom component on top of it to support it.


For arranging the text flow accounting for the Unicode Bidirectional Algorithm, we have built a native-plugin that acts as a wrapper for the ICU4C binaries that are distributed with each release. Through Mono’s interop we are able to run the algorithm from our text component. This works well in Windows, however it is not compatible with Android since our compiled binaries are “dll”.


Unity provides support for following a similar approach in Android. We could compile the binaries compatible with Andoid (.so) for the wrapper either through the Visual Studio 2022 template “Dynamic Shared Library (Android)”, by reading the Android NDK documentation and probably in more ways. However, and this is the part I need help with, we don’t know how to get the Android binaries for ICU4C.


We can’t find the Android binaries among the distributed ones, so we tried compiling the source code. We have managed to generate the DLLs for Windows from the “allinone” solution following the documentation, but haven’t been able  to change the configuration to generate Android binaries.


Call to action


  • How can I get Android compatible binaries for ICU4C? Is there a way to generate them from the source code without heavily modifying it?

  • I can see some “.so” files in the “Fedora Linux” and “Ubuntu22” releases, are those compatible with Android? If not, why aren’t the Android binaries distributed? (just curious, not trying to push anyone here)

  • At some point we will probably need to support IOs as well, so if it is a simple matter I would appreciate some help in that regard as well


Thanks!


Markus Scherer

unread,
Sep 11, 2025, 2:09:33 PMSep 11
to Lucas García Mateu, icu-support
On Thu, Sep 11, 2025 at 6:11 AM 'Lucas García Mateu' via icu-support <icu-s...@unicode.org> wrote:
  • How can I get Android compatible binaries for ICU4C? Is there a way to generate them from the source code without heavily modifying it?


ICU can be built for Android -- we know that, because Android itself includes both ICU4C and ICU4J. (Although ICU4C is mostly not publicly accessible to Android apps.)
It just seems very unusual to use Visual Studio to build code for Android.
But at least the ICU code already works on Android.

  • I can see some “.so” files in the “Fedora Linux” and “Ubuntu22” releases, are those compatible with Android? If not, why aren’t the Android binaries distributed? (just curious, not trying to push anyone here)


They are binaries for certain Linux distros. I have no idea how close these are to something that works on Android.
I think your best bet is to use an Android-appropriate build system and build the parts of ICU that you need.
We can't build and provide binaries for lots of platforms. I would personally prefer if we reduced the set of platforms for which we provide binaries.

Note that "Android" binaries may target different CPU architectures, such as x86-64 and ARM64. I don't know how these are managed for Android apps.

  • At some point we will probably need to support IOs as well, so if it is a simple matter I would appreciate some help in that regard as well


Same in principle.

Best regards,
markus
Reply all
Reply to author
Forward
0 new messages