[英]Can I use 2 manifests in one project
我可以在一个项目中制作第二个清单文件,但没有android:icon
和android:label
,因此用户只能看到一个应用程序吗?
An app module will have one manifest file; 一个应用程序模块将具有一个清单文件; you cannot have a second.
你不能有一秒钟。
Libraries that contribute to the app may have their own manifest files. 对该应用程序做出贡献的库可能具有自己的清单文件。 However, the contents of those manifests get merged with the app's manifest and other data sources (eg, Gradle).
但是,这些清单的内容会与应用程序的清单和其他数据源(例如Gradle)合并。 In the end, your app still winds up with one manifest, with one
<manifest>
element and one <application>
element. 最后,您的应用仍然以一个清单,一个
<manifest>
元素和一个<application>
元素结束。
In the future, you will get better results on Stack Overflow if you explain in your question what the real problem is (in this case, what you think having a second manifest will do for you). 将来,如果您在问题中解释真正的问题是什么(在这种情况下,您认为拥有第二个清单将为您带来什么),您将在Stack Overflow上获得更好的结果。 For example, if the reason you want two manifests is because you want two
<application>
elements, because you are trying to use two custom Application
subclasses, that is not possible. 例如,如果您想要两个清单的原因是因为您想要两个
<application>
元素,并且因为您试图使用两个自定义Application
子类,那么这是不可能的。 You would need to arrange to have one Application
subclass that provides all the functionality. 您将需要安排一个提供所有功能的
Application
子类。
the user does not see the app in the launcher, they see the launcher activity. 用户在启动器中看不到应用程序,而是看到启动器活动。 If you have more than one launcher activity they all appear in the launcher.
如果您有多个启动器活动,则它们都将显示在启动器中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.