问题:
After updating to Android Studio 3.0 and creating a new project, I noticed that in build.gradle
there is a new way to add new dependencies instead of compile
there is implementation
and instead of testCompile
there is testImplementation
. 在更新到Android Studio 3.0并创建一个新项目之后,我注意到在build.gradle
有一种新的方法来添加新的依赖项而不是compile
implementation
而不是testCompile
有testImplementation
。
Example: 例:
implementation 'com.android.support:appcompat-v7:25.0.0'
testImplementation 'junit:junit:4.12'
instead of 代替
compile 'com.android.support:appcompat-v7:25.0.0'
testCompile 'junit:junit:4.12'
What's the difference between them and what should I be using? 它们之间有什么区别,我应该使用什么?
解决方案:
参考一: https://stackoom.com/question/30gl8/Gradle中的实现和编译之间有什么区别参考二: https://oldbug.net/q/30gl8/What-s-the-difference-between-implementation-and-compile-in-Gradle
来源:oschina
链接:https://my.oschina.net/u/4438370/blog/4324762