AndroidStudio中关于implementation,api和compile,annotationProcessor

implementation和compile和api都是gradle的依赖命令,compile方法过时了,api等同于compile

implementation在某个monule中引用后,在app monule中无法使用到这个依赖

依赖原则是优先使用 implementtation,如果出问题了再使用api

--------------------------------------------------------------------

annotationProcessor

从Android Studio 3.0开始,使用annotationProcessor代替apt。不可再使用apt,否则会编译报错。

在gradle中取消对apt插件的引用,在本module中依赖改为annotationProcessor即可

猜你喜欢

转载自blog.csdn.net/hwra2008/article/details/78989640