Can't build, gradle errors

I’m trying to setup android mode, but I’m having a problem compiling my first sketch. here is the console output

It seems aidl is missing and gradle isn’t finding the right files?

A quick googling for aidl missing shows it’s likey to do with the SDK version number, but processing doesn’t seem to give much options for adjusting such things.

I was able to compile and run a hello world app on my phone from android studio just now, so it’s something to do with android mode for processing.

Caused by: java.lang.IllegalStateException: aidl is missing from 'C:\Users\Desktop\Documents\Processing\android\sdk\build-tools\26.0.2\aidl.exe'

C:\Users\Desktop\Documents\Processing\android\sdk\build-tools\26.0.2\ this folder exists but it does not have aidl.exe in it. i just did a fresh android sdk install.

This is the recommended fix but it’s not remotely clear how to go about doing this for processing

Changing the Build Tools Version from 23.0.0 rc1 to 22.0.1 in the Project Structure, then Clean and Rebuild worked for me.

EDIT: I was able to fix this by deleting the folder C:\Users\Desktop\Documents\Processing\android\sdk\build-tools\26.0.2\