安卓 android studio 报错 WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and

报错截图:

问题原因:compile会被在2018年底取消,会被imlementation替代,所以会报这个警告,解决警告的方式就是换成 imlementation 就好了

解决方法:

在 app 的 Gradle 中:

compile  改为  implementation
androidTestCompile  改为  androidTestImplementation
testCompile  改为   testImplementation

这样替换了过时的,再重新编译即可。

原文地址:https://www.cnblogs.com/-mrl/p/11130822.html