Error:(33, 0) Gradle DSL method not found: 'apt()'

gradle配置会碰到的问题

错误:
Error:(33, 0) Gradle DSL method not found: 'apt()'
Possible causes:<ul><li>The project 'TestSlider' may be using a version of Gradle that does not contain the method.
<a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>

解决方法:

在当前.gradle文件中添加:
apply plugin: 'android-apt'


classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'