Build Android OF using LTS r21 NDK?

Hello all, I’ve got a project that I’d like to bring to Android, but the current supported NDK r15c is unsupported by android and unsupported by modern libraries (e.g. gstreamer). I realize Android dev can be a headache, but I’m hoping to find a path forward.

I’m trying to get a sense of what it would take to bring the Android build up to date. I’ve discovered that it’s not as simple as just recompiling our 3rd party libs and changing the local.properties to an updated ndk.dir, but will require a re-design / update of the gradle files and migration from the com.android.tools.build:gradle-experimental:0.9.3 setup to something more modern. (Incremental updates to com.android.tools.build:gradle-experimental:0.11.1 and Gradle 4.1 aren’t sufficient, by the way). It appears there are paths forward using cmake, but that would require some larger OF build updates. I’m open to taking on some of this work if it is well-defined, but I’m not able to reach an expert level on the modern Android build system in the time I have.

@arturo @theo @zach (or anyone) Can you offer any thoughts on the future of OF on Android support? Or, perhaps know of someone who is actively working on Android w/ OF? If we abandon OF for this project, do you all have any ideas for OF-like platforms on Android? Thanks.

The port of the build system that someone did some years ago was using an experimental toolchain that was never made stable and it’s now deprecated, I’m not 100% sure that cmake is needed and i think using makefiles as we had before but adapting them to work with the official android makefile tools could be an option but haven’t really looked into it.

Other than that the code works, as far as i know, and i don’t think that there’s anything that needs to be changed in principle except for the toolchain but can’t give you much more insight than that. There’s no one looking into this at the moment and no work has been done to port the toolchain since it was ported to the gradle experimental system

1 Like

It would be great if OF could be updated to support current Android Studio somehow, and without the pain currently required. I spent weeks getting the existing NDK r15 support to work, and I am having to stick to a certain older version of Android Studio. I have recorded my steps here: Notes on steps I took to successfully get a 64-bit APK published to the Google App Store and I think those steps would be relatively easy (in Android Studio easiness terms LOL) to follow those and get a working build.

I managed to get this to work and published on the Android store, but is it (already, or going to be?) deprecated so much they won’t allow you to publish apps created this way to the store?

Well, I’m pretty interested in getting NDK r21 working ASAP. I reviewed some of @arturoc’s comments and I think it should be possible with the ndk-build script in collaboration with our existing makefile system. I’ll post any updates on this thread. @Drazinut you likely have more experience than me in this area, so I may seek some technical input if you don’t mind.

I will be glad to help if I can, as I have some existing and future software I want to be maintainable on Android, and I would love my head-banging… er, work and any useful knowledge I got… to be useful to others etc.

1 Like