Having failed to get the most recent version of the SFML example that uses gradle to build, I just went through the Windows tutorial using all the old toolchain.
It was absolutely miserable to get it to go in the end, as many steps have been obsoleted and are hard to get hold of. Just in case anyone else is going through the same nightmare between now and when the gradle version "just works" I thought I would share my notes here:
Get a version of the SFML repo from when the tutorial was written - I don't know if this is strictly necessary, but after days fighting with the latest build, I was taking no chances
git checkout ffd9c94381ad4739ce56428f10dda3daba376f30
Downgrade SDK tools to 25.2.5 or lower, because the build commands in the tutorial have been removed since then
You'll probably have to delete the tools and build-tools folders in the sdk dir because of course it won't have cleaned them out even after unchecking all the sdk tools
Make extra sure that there aren't newer tools checked in any menu in Android studio if you're using it - there are separate checkboxes for the latest ones well away from all the others. Just delete the folders in the SDK dir, Android studio can't be trusted.
Even the url to get the required version of the tools is hidden:
http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zipHave to manually put the tools folder inside the zip in the sdk dir as "tools"
https://stackoverflow.com/questions/9555337/how-to-downgrade-my-sdk-version/11514698#11514698Then the "android update ..." command will work
Of course despite having the JDK installed, it tried to look at the JRE for some reason. Fixed with (replace path as appropriate) at the console where you're trying to build:
set "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172"
Then ant fails because platform-tools aren't installed
In the SDK/tools folder run (with extreme care) and make sure it only has the box for the specific platform tools you need checked (it tried to stick 12 other packages in by default for me, many of which would have broken everything else)
android update sdk
Only option apparently is to install SDK platform tools 27.0.1, this seems to work
Despite having my phone in developer mode and plugged in "ant debug install" failed, but the apk was created successfully
Actually builds:
ant debug
Presumably replacing debug with release above would build a release version
Transfer the apk file manually
It finally works