I create a simple project and then I right-click on the project and then I use the make mudole app option. Now I have two build.gradle folders: 1-
make mudole app
build.gradle
Add buildToolsVersion to your build.gradle file this will solve your problem.
buildToolsVersion
buildToolsVersion "27.0.1"
Gradle file code
android{ compileSdkVersion 27 buildToolsVersion "27.0.1" useLibrary 'org.apache.http.legacy' }