为什么acitivies已经在清单文件中注册清单、文件、acitivies

2023-09-12 05:55:43 作者:万俟岑寂

我们工作了考试与我们的朋友。我试图解释清单文件,谈论如何做的事情。但我看到,我也知道为什么要注册活动AndroidManifest.xml中。还是不知道:)。有没有人有一个想法?

we worked for exam with our friends. I tried to explain manifest file, talking about how to do things. But I see that I did know why to register activities to androidManifest.xml. Still do not know :). Does anyone have an idea?

推荐答案

中的清单文件系统使用的知道什么样的成分做的应用有。如果没有注册你的活动 / 服务 / 接收器 / 内容提供商系统必须扫描和分析整个APK每次有人想使用一个特定的组件来找到它。这将是非常缓慢的,这就是为什么有是的Andr​​oidManifest.xml ,这是一个小文件,并且它能够被快速找到所需要的组件。

The manifest file is used by the system to know what kind of components do the application have. Without registering your Activities/Services/Receivers/Content Providers the system would have to scan and parse the whole apk every time someone wants to use a specific component to find it. This would be really slow, that's why there is the AndroidManifest.xml, which is a small file, and it can be parsed fast to find the required component.