最新版gradle4.4更新后对应的配置关键字也进行了更新,具体对应关系如下
老的配置将在2018年底被彻底移除
‘compile’ 使用 ‘implementation’ 或 ‘api’替换
‘testCompile’ 使用 ‘testImplementation’ 或 ‘testApi’替换
‘debugCompile’ 使用 ‘debugImplementation’ 或 ‘debugApi’替换
‘releaseCompile’ 使用 ‘releaseImplementation’ 或 ‘releaseApi’.
‘testApi’ 使用 ‘testImplementation’ 替换
还有就是Android Gradle Plugin 3.1.2最低支持 27.0.3,所以即使你在build.gradle中配置了buildToolsVersion 也将不起作用,将默认使用27.0.3