为什么acitivies已经在清单文件中注册 [英] why acitivies have to be registered in manifest file
问题描述
我们工作了考试与我们的朋友。我试图解释清单文件,谈论如何做的事情。但我看到,我也知道为什么要注册活动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每次有人想使用一个特定的组件来找到它。这将是非常缓慢的,这就是为什么有是的AndroidManifest.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.
这篇关于为什么acitivies已经在清单文件中注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!