简体   繁体   English

我可以在一个项目中使用2个清单吗?

[英]Can I use 2 manifests in one project

我可以在一个项目中制作第二个清单文件,但没有android:iconandroid: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.

相关问题 具有多个清单的Android项目 - Android project with multiple manifests 我可以在一个项目中使用两种不同的数据存储吗? - Can I use two different data storage in one project? 我如何将一个项目与子项目一起在另一个项目中作为带有Gradle的子项目(子模块)使用? - How i can use one project with sub projects in another project as sub project (sub module) with gradle? Android共享库项目清单 - Android Shared Library Project Manifests 我可以在图书馆项目中使用项目图书馆吗? - Can I use project libraries in the library project? 如何在我的整个 flutter 项目中使用 json object 之一? - How can i use one of the json object in the whole of my flutter project? 我可以在两个不同的应用程序中使用一个GCM项目编号来接收GCM推送吗? - Can i use one GCM project number in two different app for receive Push of GCM? CommandInvokationFailure:无法合并android清单。 有关更多详细信息,请参见控制台。 我已经在项目中的所有清单文件中进行了更改 - CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. I already made changes in all manifest files in project 我可以在另一个项目中安装一个项目的.apk文件吗? - Can I install an .apk file of one project in other project? 如何将TestNG用于Android项目? - How can I use TestNG for android project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM