在工程的build.gradle文件中加入以下修改:
buildscript { repositories { google() jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' } } allprojects { repositories { google() jcenter() maven { url "https://jitpack.io" name 'Google' } } } task clean(type: Delete) { delete rootProject.buildDir }