Help improving deploy to Android

Folks I have managed to do what I wanted locally (deploy to android), I would like to share but I have no idea how to proceed.

Instead of copying slop I will describe what I understood.

  1. Odin comes with raylib with prebuilt libraries for windows, mac and linux (libraylib.a or .dll). Using import rl "vendor:raylib" works out of the box.
    But this is not true for Android. For this the clanker downloaded the raylib and compiled with NDK (Native development kit)

  2. When linking in raylib.odin the clanker had to add extra flags because the way raylib opens assets on APK. It had to add some other imports too.

  3. In my case because I was using version dev-2026-09:a2fb372b7 I had to build raylib with -Dmain=_odin_entry_point, so the app could start correctly. But apparently this is not a problem anymore in the master branch.

I accidentally opened a pull request that addresses the issue. I built a local odin version, was able to create a libmain.so of a test application. Generate the APK with Gradle and deployed to an emulator/tablet.

So this PR is way above my pay grade, but I think it might be useful to someone that understand it. If I can be of any help, let me know and I can give more details.

1 Like