Unable to build SDL2 Android app

Hi, I’m trying to follow this guide to build an app for my android device. I’m using SDL2 version 2.0.16, Linux Mint, I tried several versions of NDK and SDK via Android Studio SDK manager or from the internet, all of them met the requirements listed in the guide. I ran ./androidbuild.sh org.libsdl.testgles ../test/testgles.c which created Android Studio project inside build folder. Next step is to run ./gradlew installDebug which should install the app on my android device connected though USB. Running it will throw this error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org


I also tried to open the generated project inside Android Studio in the hope it will install some missing dependencies or correct versions of SDK/NDK. I got the same error.
EDIT: Android Studio gives me more information. I have to put them on pastebin because pasting it here will for some reason trigger Akismet and delete my post

Can you try with the latest snapshot? We just updated to newer gradle and build tools:


Thank you so much, it’s working now!!