Android Dynamic Library project broken on develop

I have come across a recent change on develop that breaks Dynamic Library projects on Android. My app was crashing when loading the library, because it could not find the Java class com.roli.juce.JuceActivity - the class does not exist in the library or the parent Android project.

Switching to master solved the issue. I tracked it down to what I believe is the following commit:

I’m reporting here rather than GitHub as it doesn’t look like issues are being responded to there…

Does the project that you are building contain juce_gui_basics? I think the issue might be that we are adding the javaopt folders for juce_gui_basics to all projects. I’ve pushed a fix here, can you see if it solves the issue for you?

Yes, it does contain juce_gui_basics. The library project provides some GUI to the parent project.

Thanks for the quick response, but I’m not sure the fix will address the issue. Previously, the field for the androidCustomActivityClass was not auto-populated. It needs to be able to be set blank (as was the case previously), in case the project does not have it’s own Activity Class. I think that needs to be decoupled from the Push Notifications stuff, as in the case of using JUCE to create a library project on Android, it would generally be the parent project that handles that kind of thing.

Also one of the main motivations behind the massive Android refactor was to decouple the Activity from the .jucer project.

OK, thanks for the info. We’ll look into it.

1 Like

OK, I’ve updated the Android exporter to only add the activity name if push notifications are enabled as this is required for us to override the onNewIntent() method. Can you rebuild the Projucer with this commit and see if it fixes the issue?

1 Like

Thanks Ed, that fixed the issue :+1:

1 Like