AndroidStudio升级后compile 要变成implementation
错误提示
For an Android project, the new configurations came with the Android Gradle Plugin 3.0. So unless you are still using the 2.x version of Android Studio / Android Gradle plugin, the use of compile is deprecated. So you should use implementation, even for an app.
Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018
Configuration 'debugCompile' is obsolete and has been replaced with 'debugImplementation'.
It will be removed at the end of 2018
Configuration 'releaseCompile' is obsolete and has been replaced with 'releaseImplementation'.
It will be removed at the end of 2018
解决方法
compile—>implementation
debugCompile—>debugImplementation
releaseCompile—>releaseImplementation
。。。
compile:
可以传递依赖引用,编译时间相对来说长久一些
implementation:
不可传递依赖引用,比如,B依赖A,C再依赖B,C却不能依赖A的引用或者依赖。当然他的编译时间就会短一些。
对于api代替compile,他们功能相同。