检查“is Library”是什么意思?复选框“在封面下”吗?
我注意到,当我将现有的 Android 应用程序项目转换为 Android 库项目 通过检查“是库”复选框,项目的源代码或 XML 文件没有任何变化。
那么,当选中“is Library”复选框时,到底会发生什么? 包和/或项目文件内部发生了什么变化?我可以在哪里了解更多相关信息?
为了更好地解释我的问题:
- 我有兴趣知道什么(主要是 用于故障排除)是 应用程序包与库的区别 包裹“在封面下”?
- 事实上,一个项目是 “图书馆项目”标记 某处?如果是的话,它在哪里 标记它(显然不在源代码中 文件,甚至不在 res XML 中 文件)
I noticed that when I convert an existing Android Application project to an Android Library project by checking the "is Library" checkbox, nothing changes in the project's source code or XML files.
So what really happens when the "is Library" checkbox is checked? What changes internally, in the package and/or project files? Where can I learn more about this?
To better explain my question:
- What I am interested to know (mainly
for troubleshooting purposes) is
what differentiates an Application package from a Library
package "under the cover"? - Is the fact that a project is
"Library Project" marked
somewhere? If so, where does it
mark it (obviously not in the source
files and not even in the res XML
files)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从从命令行页面管理项目:
换句话说,它是由构建系统而不是操作系统使用的属性。
更新:我使用的是 iPhone,所以我不会输入完整的释义,但这里有一篇非常好的博客文章,讨论了 Java JAR 和 Android 库项目之间的差异,包括 dex 工具如何添加资源和 dex 代码到.apk:
http://devmaze.wordpress.com/2011/05/22 /android-application-android-libraries-and-jar-libraries/
From the Managing Projects from the Command Line page:
In other words, it's a property that is utilized by the build system and not by the operating system.
UPDATE: I'm on my iPhone so I won't type out a whole paraphrase, but here's a pretty good blog article discussing the differences between a Java JAR and an Android Library Project, including how the dex tools add the resources and dex code to the .apk:
http://devmaze.wordpress.com/2011/05/22/android-application-android-libraries-and-jar-libraries/
来自开发站点: http://developer.android.com/guide/developing /projects/projects-eclipse.html
From the devsite: http://developer.android.com/guide/developing/projects/projects-eclipse.html
库项目并不像您习惯的 jar 那样打包为单独的可再发行文件。它与您的应用程序的 apk 文件合并。
您链接到的页面在 引用库项目 部分。
A library project isn't packaged as a seperate redistributable file as you're used to with a jar. It's merged with the the apk file of your application.
The page you linked to mentions it in the Referencing a library project section.