Android-组合项目
我目前正在开发一个大型项目,我已将所有不同的模块构建到他们自己的项目中。现在我需要将所有模块放在一起到一个项目中。
我希望在单击某些按钮时启动单独的活动,并且我知道如何做到这一点。我所面临的困难是将所有其他子活动导入到主要活动中。
我可以将模块化项目中的所有源文件导入到主应用程序中它们存在于自己项目中的位置吗?我想象我必须在主 Activity.j 文件中声明我必须包含所有内容,但我还没有构建一个真正大的项目,因此非常感谢一些帮助。
如果有人对将多个项目导入一个主项目有任何建议,我很乐意向他们提供。
Im currently working on a large project and I have built all the different modules into their own projects. Now I need to put all the modules together into one project.
I would like for the separate activities to launch upon certain button clicks and I know how to do that. What Im kind of struggling with is importing all the other child activities into the main one.
Can I just import all the source files from my modular projects into their places in the main app where they exist in their own project? Im imagining I will have to make declarations in the main activity.j file that I have to include everything but I havent built a really large project yet so some help would be much appreciated.
If anybody has any tips on importing multiple projects into one main one I would love to here from them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将要包含的项目添加到库项目并将它们添加到主项目设置中。您需要将所有图书馆项目清单中的服务、活动添加到主项目清单中。
完全限定主项目中的所有名称以指向库项目。完全限定资源文件中的所有自定义视图名称。
就这样。
Make the projects, you want to include, to library projects and add them to the main projects settings. You need to add the services, activities from all library projects manifests to the main projects manifest.
Full qualify all names in the main project to point to the library projects. Full qualify all custom view names in ressource files.
That's all.