Android - Latest `develop` branch crash on init for older SDK

I’ve started by testing my app on old Android 5.0 tablet.
Once failed, I’ve tried the Emulator API21 which also crashes.

I’m also able to reproduce this with AudioPluginDemo.

All has exact same init crash:

2022-08-08 10:21:44.220 3703-3703/com.juce.audioplugindemo I/JUCE: JUCE Assertion failure in juce_android_JNIHelpers.cpp:295
2022-08-08 10:21:44.226 3703-3703/com.juce.audioplugindemo A/art: art/runtime/] JNI DETECTED ERROR IN APPLICATION: JNI NewStringUTF called with pending exception 'java.lang.NoSuchMethodError' thrown in void com.rmsl.juce.Java.initialiseJUCE(android.content.Context):-2
2022-08-08 10:21:44.226 3703-3703/com.juce.audioplugindemo A/art: art/runtime/]     in call to NewStringUTF
2022-08-08 10:21:44.226 3703-3703/com.juce.audioplugindemo A/art: art/runtime/]     from void com.rmsl.juce.Java.initialiseJUCE(android.content.Context)

So you can easily reproduce this on API21 emulator.

I’ve bisected this.
This is the faulty commit, seems the additional logic here won’t work on older Android:

Sorry about that, it should be fixed here:

Hi, thanks for that.
Now there’s no crash.
However it seems at some point JUCE was broken for older APIs?

This is AudioPluginDemo on API33:

This is AudioPluginDemo on API21:

That’s weird, I tested the AudioPlaybackDemo on API 21 and that seemed to work. Have you tried any other demo programs?

When I create a basic Android project it does show up correctly.
Just mind the plug-in, I’ve tested with AudioPluginDemo v.s. AudioPlaybackDemo.
(I’ve cleaned/deleted the project and retried to assure my results).

So I guess it’s related to how the Standalone Plug-In attach the PluginEditor.

Sorry about that. Very odd. Something with my emulator was strange. After not reproducing this on another Windows machine I’ve created new AVD and it worked as expected.