Android应用程序打包
我有两个 Android 应用程序 - A 和 B。
我试图将它们打包为一个单元,以便在安装时系统会安装这两个应用程序。然而,到目前为止我还没有找到任何可靠的答案。
在A的清单文件中我添加了B的活动标签,导致错误。
谁能指导我如何将两个应用程序打包为一个单元?
提前致谢!
I have two android applications- A and B.
I'm trying to package them as a single unit so that upon installation the system installs both apps. However, I could not find any reliable answer till now.
In A's manifest file I added activity tag of B, resulting in error.
Could anyone guide me on how to package two applications as a single unit?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不相信这是可能的。一个 APK 对应一个
AndroidManifest.xml
,而该AndroidManifest.xml
又对应一个应用程序。但是,如果您想要多个“启动器”或图标,可以通过将
IntentFilter
添加到您想要的活动(采用启动器事件)来公开多个活动。然而,从技术上讲,它们仍然是一个单一的应用程序。更新:
以下是公开多个 Activity 的方法。主要活动在 AndroidManifest.xml 中会有类似的内容,
将其复制粘贴到您想要公开的其他活动中。例如:
I do not believe this is possible. An APK corresponds to a single
AndroidManifest.xml
which corresponds to a single Application.However, if you want mulitple "launchers" or icons, it is possible by exposing multiple Activities by adding
IntentFilter
s to the ones you want (which take the launcher event). However, they are still, technically, a single application.Update:
Here's how to expose multiple Activities. The main activity would have something similar in the AndroidManifest.xml
Copy-paste this inside the other Activities you want to expose. For example: