Building stand-alone Android JUCE library (Early 2018)

I’m attempting to construct a multiplatform (iOS & Android) C++ library that links against JUCE.

Looking through forum posts I can see that a couple of years ago this was not possible:

(Timur, Apr 2016 Build juce shared library for Android, stuck - #4 by timur):

Building C++ libraries for Android, whether static or dynamic, is currently not supported.

The reason is that a lot of JUCE functionality on Android relies on our JUCE AppActivity class written in Java. But if you are building a library, you don’t have that activity class.

(Jules, May 2016 juce_CreateApplication() for Dynamic Library in Android - #2 by jules):

Right now a lot of the juce codebase relies on being able to call Java methods in the activity class in order to control a whole bunch of OS functionality. So it’s not really possible to just build a standalone .so file.

This is something we want to change, by rewriting all of these Java dependencies as embedded C++/JNI code, which would make this possible, but this will take some time, and won’t happen just yet!

This is a complete showstopper!

Has any advance being made since these posts? Could someone from ROLI give a status report, maybe even put an ETA on it?

I’m afraid nothing has changed since those two posts. So no development, and no ETA.

Sorry!

Just one thing to mention here is that it does entirely depend on what you want your library to do.

The majority of JUCE classes are pure C++ or use native libraries, so they don’t actually need to make any java calls under the hood to do their work. If all you’re doing is using those, then you’ll be fine to build a DLL and link it into some other java app.

1 Like