简体   繁体   English

Android主程序包与库模块:我应保留谁的应用程序版本数据?

[英]Android main package vs library module: who's app version data do I retain?

I was wondering where I should specify the versionCode/versionName in an Android library. 我想知道在Android库中应该在哪里指定versionCode / versionName。 Before I created the module, the app version data was stored in the manifest. 在创建模块之前,应用程序版本数据已存储在清单中。 Now I have two manifests, one for the main application (third-party) and one for the the library. 现在,我有两个清单,一个用于主应用程序(第三方),一个用于库。 I know that the main application's manifest gets higher priority during a merge, so I'm concerned that a the third-party's app version data will overwrite ours and cause issues. 我知道在合并过程中主应用程序的清单会获得更高的优先级,因此我担心第三方的应用程序版本数据会覆盖我们的清单数据并导致问题。

Is this a problem I should be worried about? 这是我应该担心的问题吗? If so, what's the standard fix in this situation? 如果是这样,这种情况下的标准解决方案是什么?

I'd be grateful for any advice. 如有任何建议,我将不胜感激。 Thank you! 谢谢!

I was wondering where I should specify the versionCode/versionName in an Android library. 我想知道在Android库中应该在哪里指定versionCode / versionName。

You don't. 你不知道 They do not have version codes or version names. 他们没有版本代码或版本名称。

If so, what's the standard fix in this situation? 如果是这样,这种情况下的标准解决方案是什么?

Remove the version code and version name from the library module. 从库模块中删除版本代码和版本名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Android 项目查询中引用库模块中的主要应用程序资源 - Referencing main app resources in library module(s) in Android project inquiry 除了在主应用程序 gradle 模块中启用数据绑定外,不能在其他包(库/sdk)中使用数据绑定 - Cannot use Data Binding in other package(library/sdk) except enabling dataBinding in main app gradle module 在Android应用中保留数据 - Retain data in android app 如何在 android studio 中创建一个包含调试和主包的 android 库模块? - How do I create an android library module in android studio which contains debug and main packages instead? 应用模块与库模块 - App module vs Library Module 从Android库模块在主应用程序中启动活动 - Launch an activity in main app from an Android Library Module Android如何模块(库)调用主应用程序功能? - Android how to module (Library) to call main app function? 从演示应用程序内部获取 Android 库模块版本号 - Get Android library module version number from inside demo app Android-在应用程序模块中未调用库模块的接口方法 - Android - library module's interface method is not called in app module 如何仅针对我的库模块/包获取特定于包的崩溃报告/数据(在某些应用程序中通过gradle依赖关系实现) - How do I obtain package specific crash report/data only for my library module/package (implemented in some Application via gradle dependency)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM