make: *** No rule to make target 'hidapi'. Stop.

I’ve updated my SDL game from 2.0.16 to .20 and it all builds and works fine in the Emulator. But when I try and build the .APK file I get this error message:

Build command failed.
Error while executing process D:\Android\androidSDK\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\Android\androidprojects\MoaB\app\src\main\jni\Android.mk NDK_APPLICATION_MK=D:\Android\androidprojects\MoaB\app\src\main\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=D:/Android/androidprojects/MoaB/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=D:\Android\androidprojects\MoaB\app\build\intermediates\ndkBuild\release\lib SDL2 SDL2_image SDL2_mixer SDL2_ttf hidapi main mpg123}
make: Nothing to be done for ‘SDL2’.
make: Nothing to be done for ‘SDL2_image’.
make: Nothing to be done for ‘SDL2_mixer’.
make: Nothing to be done for ‘SDL2_ttf’.

make: *** No rule to make target ‘hidapi’. Stop.

I’ve tried doing a Clean, refreshing the linked C++ projects and restarting Android Studio but nothing seems to work. Any ideas?

I’ve got it solved but I’ll leave the post up in case anyone else has the same problem! I upped the number in build.gradle to:

classpath ‘com.android.tools.build:gradle:4.2.2’

and doing that made Android Studio tell me to up gradle-wrapper.properties to:

distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-bin.zip

I understand none of this, but it seems to work now!