gpt4 book ai didi

android - 选中 "is Library"复选框有什么作用 "Under the Cover"?

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:01:38 25 4
gpt4 key购买 nike

我注意到,当我将现有的 Android 应用程序项目转换为 Android 库项目时 by checking the "is Library" checkbox ,项目的源代码或 XML 文件没有任何变化。

那么当“是图书馆”复选框被选中时到底发生了什么? 包和/或项目文件内部有什么变化?我在哪里可以了解更多相关信息?

为了更好地解释我的问题:

  1. 我有兴趣了解的内容(主要是用于故障排除目的)是应用程序包与库的区别“隐藏”包装?
  2. 是一个项目的事实“图书馆计划”标记某处?如果是这样,它在哪里标记它(显然不在源代码中文件,甚至不在 res XML 中文件)

最佳答案

来自Managing Projects from the Command Line page :

The create lib-project command creates a standard project structure that includes preset property that indicates to the build system that the project is a library. It does this by adding this line to the project's default.properties file:

android.library=true

换句话说,它是构建系统而不是操作系统使用的属性。

更新:我在我的 iPhone 上,所以我不会输入完整的释义,但这里有一篇非常好的博客文章,讨论了 Java JAR 和 Android 库项目之间的区别,包括 dex 工具如何添加资源和 dex 代码到 .apk:

http://devmaze.wordpress.com/2011/05/22/android-application-android-libraries-and-jar-libraries/

关于android - 选中 "is Library"复选框有什么作用 "Under the Cover"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6333093/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com