-
Notifications
You must be signed in to change notification settings - Fork 0
常见问题
Qu edited this page Jul 8, 2019
·
5 revisions
共通资源,如一些图片、string、style 等可以存放在 ComponentSDK,如果比较多的话可以再划分一个 Module ComponentUI\ComponentRes 来存放都是可以的
具体做法是在每个 Module 模块的 build.gradle 文件的 android 标签内添加
android {
resourcePrefix "login_"
}
login_ 为前缀名,此时再定义资源文件时,AS 会约束资源文件名,并要求我们手动加上前缀,但是如果你不加的话也是可以编译的,只是起到一个约束的作用
组件化必然会出现多个 build.gralde ,相同的库会在多个 Module 同时引用,为了保证所有库的版本统一性,我们可以定义一个 config.gradle 来管家所有库的版本,包括应用程序版本、包名、基础库等