baronz88 / modularizationproject Goto Github PK
View Code? Open in Web Editor NEWAndroid 模块化示例项目
Android 模块化示例项目
大神能加上吗,demo好久没更了
例如微信那样的布局,4Tab
的都是fragment
填充,如何组件化?我看了一些组件化的文章都是以Activity
为单位进行,而实际开发中往往是一个Activity
带几个Fragment
。
Error:Execution failed for task ':NewHouseModule:processDebugManifest'.
Manifest merger failed : Attribute application@label value=(@string/new_house_app_name) from AndroidManifest.xml:8:9-51
is also present at [com.github.BaronZ88:Retrofit2-FastJson-Converter:1.2] AndroidManifest.xml:13:9-41 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to element at AndroidManifest.xml:5:5-20:19 to override.
你好,关于 Lib Module 的 sourceSets
,我觉得通过 Gradle 的 productFlavors
来完成比较好点。
publishNonDefault true
flavorDimensions "mode"
productFlavors {
app {
dimension "mode"
}
lib {
dimension "mode"
}
}
在 App Module 中通过指定 productFlavors
来依赖
if (!isDebug.toBoolean()) {
compile project(path: ':business1', configuration: 'libDebug')
compile project(path: ':business2', configuration: 'libDebug')
} else {
compile project(':basicbusiness')
}
这样做有个好处是,可以在不同 productFlavors
对应的目录下放置属于各自的资源或者 Java 文件,让 Gradle 自动去合并。一来不用完全拷贝两份 AndroidManifest.xml ,只需要改下特定的部分,放在 src/app/
目录下的 AndroidManifest.xml,通用部分放在 main
目录下的 AndroidManifest.xml。第二,不会将多余的资源文件打包进去,比如有些文件只需要在 Module 作为 Application 的时候需要的。
我最近也在做这个模块化,组件化的事情,希望能一起探讨下。
我下载下来之后再最新版本的android studio 4.0上无法使用 ,能否适配一下最新版本的android studio
我理解的loginModule应该是和NewHouseModule业务模块同级的。如果两者之间做到解耦,那在单独运行新房业务模块时,怎么使用登录模块的功能呢? 望回复,谢谢。
怎么运行单个模块呢?运行某个activity 的时候会需要选择一个module,只有app 可以选
在一些特定情况下,A模块进行了操作,这时B模块的页面在栈低,按返回键后会被显示,这时B模块的数据要根据A模块的操作进行更新,这时A模块与B模块之间通信如何做到呢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.