Android - oboe - PolyphaseResampler (and a few others...) build error

Just tried with head of master (6.0.5)

Building Juce as a static library, if that helps!

  • …/…/JUCE/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp
  • use of undeclared identifier ‘assert’
  • …/…/JUCE/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.cpp
  • use of undeclared identifier ‘assert’
  • …/…/JUCE/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp
  • use of undeclared identifier ‘assert’
  • …/…/JUCE/modules/juce_audio_devices/native/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp
  • use of undeclared identifier ‘assert’

HTH! Pete

Have you modified the JUCE files at all? Can you share some more info about how the project is set up, and perhaps try to reproduce this with a default new JUCE project with no changes? I’m unable to reproduce this with a vanilla GUI or static library project, using Android Studio 4.1.1 on macOS.

Hi Ed,

Happy New year to you!

I created a completely new Library project (static) using the ProJucer from head of master. Platform is macOS. No Source files yet added to the project, so I was building it “empty”. Very latest Android Studio, latest gradle, latest NDK.

It would appear that, for some reason, the “assert” wasn’t defined. I’d guess that could be solved by a simple #include somewhere.

NB on separate note I’ve had problems with other project over the weekend; it is as though gcc has been replaced by clang under the hood in the past couple of weeks. I don’t know if that is related or not. FWIW, that has affected building of plain “.c” files mixed-in with C++ source code, amongst other things.

Best wishes,


I don’t think the NDK even supports GCC any more so it’ll be building using Clang. Can you post the exact version of Android Studio, gradle, SDK, and NDK that you are using?

Android Studio 4.1.1
Gradle 4.0.0
compileSdkVersion 29
NDK 22.0.7026061

These were all all configured by the Projucer “out of the box”

That was it. The version of the Oboe code that we include in JUCE isn’t compatible with the latest NDK version so we needed to update it. We’ve added this to develop here:

Great, many thanks for letting me know! Pete