I tried looking other similar questions on stackoverflow, they advice us to changw version of \"buildToolsVersion\" but I dont see word like that in my gradle file.
At the time of this answer Android Studio 3.1.4 is out with Android Support 28.0.0 Release Candidate(Potential Final, Beta) so please update.
Well, here is a config that will certainly work for you.