아래와 같이 에러가 발생하였을때
ERROR: Unable to find method 'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
해결방법
Project/gradle/wrapper/gradle-wrapper.properties 파일로 들어가서
5.1.1부분을 4.6이라던지 4.1로 버전을 변경해보시면 정상 빌드 되실겁니다.
그래도 안되시면
안드로이드 스튜디오를 종료후 재시작 해보시거나
File/Sync Project with Gradle File를 눌러 보시기 발랍니다.