Android studio won't let me build on SDK version lower than 25

This is really strange as getting runtime permissions on macOS does absolutely nothing. It’s an empty function:

Yeah, that earlier comment was in error. I falsely assumed that the problem was the permissions call. But it is not. It is the initialise call to the AudioDeviceManager that causes the problem.

Really hard to know what’s going on there without seeing some code. Doesn’t the AudioAppComponent already have it’s own AudioDeviceManager?

Does it? I just based my code on what I saw in the Juce Demo and so I came up with something that includes the following:

class MainContentComponent : public AudioAppComponent, public ButtonListener, public Timer {
public:
    static ScopedPointer<AudioDeviceManager> audioDeviceMan;
    
    MainContentComponent() : deviceManager(getSharedAudioDeviceManager()) {

    /* CODE... */

    setSize (800, 600);
    startTimer(20);
    setAudioChannels (2, 2);
}

static AudioDeviceManager& getSharedAudioDeviceManager() {
    if (audioDeviceMan == nullptr) {
        audioDeviceMan = new AudioDeviceManager();
        RuntimePermissions::request (RuntimePermissions::recordAudio, runtimePermissionsCallback);
    }
    
    return *audioDeviceMan;
}

static void runtimePermissionsCallback (bool wasGranted) {
    int numInputChannels = wasGranted ? 2 : 0;
    Logger::outputDebugString("Audio recording " + String(wasGranted ? "granted" : "not granted"));
    audioDeviceMan->initialise (numInputChannels, 2, nullptr, true, String(), nullptr);
        Logger::outputDebugString("Created " + String(numInputChannels) + " channels");
}

private:
AudioDeviceManager& deviceManager;
}

    ScopedPointer<AudioDeviceManager> MainContentComponent::audioDeviceMan = nullptr;

Yes this is not the way do this. You are creating the AudioDeviceManager two times. Have a look at this example instead:

I probably should have also mentioned that a couple of my other classes inherit AudioIODeviceCallback and so, from my MainContentComponent constructor I add a few audio callbacks to the device manager. And for both of these audio callbacks I need recording permissions on Android.

So, I now understand that there is a public AudioDeviceManager in the AudioAppComponent class. But what I am unsure of, is whether I need to initialise the AudioDeviceManager or if it would already have been initialised in the AudioAppComponent class’ constructor?

Look at the sample code I posted above: you call setAudioChannels to initialise the audio.

OK thanks.