For the record, I’m currently using the following versions of everything and can build OK:
android studio 3.0.1
android sdk platform-tools 27.0.1
android sdk tools 26.1.1
NDK 16.1.4479499
Make sure you have build tools 26.0.2 installed too. One of the build.gradle files (called ‘build.gradle (Module:app) in the android project) references ‘buildToolsVersion “26.0.2”‘ so you could also try editing this to any version you have installed.
Finally, you might want to check you have all ‘SDK Update Sites’ enabled.