美文网首页
Android 项目结构过程中,该如何取舍 api, imple

Android 项目结构过程中,该如何取舍 api, imple

作者: 半截铅笔 | 来源:发表于2019-01-28 16:59 被阅读6次

1.优先使用 implementation.保证相关代码隔离.

2.如果存在继承关系, 使用api. 否则会报错

# [error: supertypes of the following classes cannot be resolved](https://stackoverflow.com/questions/44598848/error-supertypes-of-the-following-classes-cannot-be-resolved-please-make-sure)

3.如果使用了注入,则也 需要使用api

4.如果是基础库,项目中的每个moudule 都会应用的 ,类似于 lib_comm 之类的, 可以在子module 中 通过 compileOnly 依赖.

相关文章

网友评论

      本文标题:Android 项目结构过程中,该如何取舍 api, imple

      本文链接:https://www.haomeiwen.com/subject/vtaajqtx.html